2015-10-07 47 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集成也很好;-)