1. 判斷當前jdk的位數java
# java -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode) # 若是是64位,最後一行會有顯示64-Bit #java -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
2. 若是eclipse 啓動時報 fail to load the jni shared library, 這種狀況就是eclipse要求的jdk位數與當前eclipse調用的jdk位數不一致,須要調整。有2個方案:shell
# a. 調整JAVA_HOME至正確的jdk directory,即修改JAVA_HOME, PATH等 # b. 修改eclipse安裝目錄下的eclipse.ini文件,使用-vm參數指明須要的javaw.exe所在directory -vm C:\developworks\lib\jdk\jdk1.7.0_67\bin\javaw.exe