最近剛重灌電腦,上次安裝失敗,這次就好好順便紀錄一下安裝過程。
安裝環境:Ubuntu 9.10 Desktop i386
- 安裝 Eclipse
- # sudo apt-get install eclipse
- 安裝 Subclipse
- 開起 eclipse
- [Help] -> [Install New Software] 點選 Add
- Name : subclipse
- Locatioon : http://subclipse.tigris.org/update
- 點選 Subclipse Plugin -> Subclipse
- 接著就 Next 進行囉 (記得版權那邊要勾一下才能按 Finish 安裝喔)
- 設定 Eclipse
- [Window]->[Preferences]->[Team]->[SVN]
- 此時會蹦出錯誤訊號窗
- Failed to load JavaHL Library.
There are the errors that were encountered:
no libsunjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = /usr/lib/jvm/java-6-openjdk/jre/lib/i386/cclient:/usr/lib/lib/jvm/java-6-openjdk/jre/lib/i386:......:/usr/lib/jni:/usr/lib - 這是因為一開始預設是用 JavaHL 關係
- Failed to load JavaHL Library.
- 解決方式有兩種
- 第一種:在剛剛的頁面上,有 SVN interface 選項,有 JavaHL(JNI) 跟 JavaSVN(Pure Java) 兩種可選,切換成 JavaSVN 就行了!
- 第二種:安裝 JavaHL
- # sudo apt-get install libsvn-java
- 只是我安裝完仍有看到錯誤訊息
- Failed to load JavaHL Library.
There are ther errors that were encountered:
no libsvnjavahl-1 in java.library.path
Incompatible JavaHL library loaded, 1.3.x or later required.
- Failed to load JavaHL Library.
- 然而自己就很懶得再繼續解下去,就略過這個解法,改用 JavaSVN(Pure Java) 啦
- 測試
- [File]->[New]->[Other]->[SVN]->[Checkout Projects from SVN]->[Create a new repository location]
- 若預設就在這個選項,但又不能按 Next ,就先選另一個選項再切回來就可以選 Next 啦
- 剩下的就只是選你要 checkout 的目錄囉,選完按 Finish 就能跑了
- [File]->[New]->[Other]->[SVN]->[Checkout Projects from SVN]->[Create a new repository location]
以上純粹只是在 Linux 上使用安裝 Subclipse plugin for Eclipse 而已,並不是要開發 Java 類的程式,因此僅利用預設的環境。
add
回覆刪除-Djava.library.path=/usr/lib/jni
in eclipse.ini will work.
版主回覆:(11/08/2009 11:20:44 PM)
感謝你的指點, 又有一陣子沒用了, 太習慣只用 vim , 下次會來試試 :D