2015-10-07 54 views
2

我正在使用jgit来克隆使用java代码的存储库。我可以在测试时克隆到本地(Windows)计算机,但无法克隆到aws服务器。git clone在java中不起作用

文件夹未在本地路径中创建。我在/tmp/loc/$proName下创建了克隆。我给了777到loc文件夹,但无法在里面获得回购。

任何帮助,将不胜感激。

在此先感谢

+0

什么是错误消息? – VonC

+0

引起:java.lang.NoClassDefFoundError:无法初始化类org.eclipse.jgit.util.FS – DevGo

回答

3
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.util.FS 

,这似乎是一个pending bug为此有人建议:

this is probably incomplete classpath in the script.

Please try editing your /usr/bin/jgit script and changing the " export JGIT_CLASSPATH " line to the following:

export JGIT_CLASSPATH="$(build-classpath jgit slf4j args4j jsch commons-compress xz-java javaewah)" 

And see if that fixes the problem for you.

+0

/usr/bin /下没有jgit。 – DevGo

+0

@ Mary.Hansen好的,您可以搜索jgit文件以查看安装位置? – VonC

+0

我只是在我的项目中使用jgit jar。 – DevGo

1

总之 - Eclipse中的完全重新安装固定java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.util.FS错误我越来越。

我在Mac上,我试着用重新启动来更新Eclipse和Java,并且问题仍然存在。

我只是决定重新安装Eclipse,并解决了这个问题。我将整个/Applications/Eclipse.app文件夹移动到一个临时位置,然后再次下载并运行Eclipse,并且它工作正常,git集成也很好;-)