2013-06-27 50 views
2

我試圖改變eclipse.ini文件添加-vm C:\Program Files\Java\jdk1.7.0\bin\javaw.exe不能使變化的eclipse.ini

爲了擺脫錯誤後,Eclipse開放:

java runtime environment JRE or java development kit must be available in order to run eclipse. No java virtual machine was found after searching in the folloiwng location

但錯誤仍然存​​在,我做錯了什麼?

-startup 
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar 
--launcher.library 
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502 
-product 
org.eclipse.epp.package.jee.product 
--launcher.defaultAction 
openFile 
--launcher.XXMaxPermSize 
256M 
-showsplash 
org.eclipse.platform 
--launcher.XXMaxPermSize 
256m 
--launcher.defaultAction 
openFile 
-vm C:\Program Files\Java\jdk1.7.0\bin\javaw.exe 
-vmargs 
-Dosgi.requiredJavaVersion=1.5 
-Xms40m 
-Xmx512m 

回答

4

根據this Eclipse document

Note the format of the -vm option - it is important to be exact:

The -vm option and its value (the path) must be on separate lines. 
The value must be the full absolute or relative path to the Java executable, not just to the Java home directory. 
The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM. 

注意的第一個要求。因此,嘗試在.ini文件中使用這個地方:

-vm 
C:\Program Files\Java\jdk1.7.0\bin\javaw.exe 
-vmargs 
-Dosgi.requiredJavaVersion=1.5 
-Xms40m 
-Xmx512m 

注:這顯然是強制執行的.ini文件語法脆弱的方式,我相信Eclipse的更高版本已經修復了這個潛在的問題。但是,看着你的文件,你似乎有一個2011年5月的版本,如果它不工作,我會盡量嚴格遵循.ini文件。

0

嘗試使用相同的值:

-Xms-Xmx

例如:

-Xms384m -Xmx384m

這對我的作品