日韩黑丝制服一区视频播放|日韩欧美人妻丝袜视频在线观看|九九影院一级蜜桃|亚洲中文在线导航|青草草视频在线观看|婷婷五月色伊人网站|日本一区二区在线|国产AV一二三四区毛片|正在播放久草视频|亚洲色图精品一区

分享

eclipse 錯誤 java was started but returned exit code =

 蹇勝雄 2017-06-14

Java was started but returned exit code =-805306369

這個錯誤原因可能有很多,我這只是一只可能的解決方法,如下:

主要原因是eclipse.ini配置文件錯誤了,配置文件中-vm參數(shù)設(shè)置錯誤,在windows7系統(tǒng)下需要使用 " / " 而不是 " \ "

原配置文件:

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
C:\soft\Java\jdk1.6.0_25\bin\javaw.exe

--launcher.defaultAction
openFile

-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

修改后的配置文件:

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
C:/soft/Java/jdk1.6.0_25/bin/javaw.exe

--launcher.defaultAction
openFile

-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

參考文獻(xiàn):

Eclipse出現(xiàn)java was started but returned exit code 1報(bào)錯并退出

最近在使用Eclipse時發(fā)現(xiàn)無法啟動,或者啟動后經(jīng)常出現(xiàn)崩潰退出的情況,提示的錯誤信息都是“java was started but returned exit code 1”,下載安裝了最新版的Eclipse后還是沒有解決問題。無奈之下只好百度之,翻了好幾頁都沒有發(fā)現(xiàn)有用的信息,直接換到Google.com,終于在Eclipse Forum找到了一個靠譜的答案(網(wǎng)址是http://www./forums/index.php?t=tree&goto=547573&#page_top),回答答案是“Eclipse is using the system default JRE that it finds in the windows system folders. You should point it to a JDK installation using eclipse.ini (as described here: http://wiki./Eclipse.ini )”,大意是Eclipse啟動的時候默認(rèn)會使用從windows系統(tǒng)目錄下找到的JRE作為默認(rèn)的環(huán)境,由于我之前升級安裝了一下JDK,所以系統(tǒng)目錄下的JRE和實(shí)際的Java安裝是不匹配的,因此會出現(xiàn)運(yùn)行Eclipse時報(bào)錯的情況。
解決方案:
根據(jù)eclipse.ini文件的說明(http://wiki./Eclipse.ini),該文件提供指定運(yùn)行eclipse的JVM功能,需要在eclipse.ini中加入JVM的路徑說明。語法很簡單:

-vm
C:\Program Files\Java\jdk1.6.0_22\bin\javaw.exe

eclipse.ini說明文檔中特別提到使用-vm參數(shù)的注意事項(xiàng):
(1)The -vm option and its value (the path) must be on separate lines.(-vm選項(xiàng)和其對應(yīng)的javaw.exe的路徑必須各占一行,這應(yīng)該是參數(shù)解析的格式要求)
(2)The value must be the full absolute path to the Java executable, not just to the Java home directory.(指定的虛擬機(jī)路徑必須是指向可執(zhí)行Java程序的完整絕對路徑,不能只指定到Java_HOME目錄。這個好理解,要指定JVM的話肯定要指定到具體的可執(zhí)行文件去)
(3)The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM.(-vm選項(xiàng)必須放在-vmargs選項(xiàng)前,這是因?yàn)?vmargs選項(xiàng)后的值都是作為JVM的參數(shù)傳給虛擬機(jī)的,如果-vm放在-vmargs之后就沒有意義了。而-vmargs選項(xiàng)中一般可指定-Xms和-Xmx這兩個內(nèi)存參數(shù))

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多