一般安裝JDK的時候,會同時在系統(tǒng)目錄下也安裝一個JRE環(huán)境。開始我把安裝在系統(tǒng)目錄下的JRE環(huán)境卸載了,在環(huán)境變量中添加一個變量JAVA_HOME,并設(shè)定值為“F:\j2sdk”(JDK的安裝目錄),在Path變量中添加“%JAVA_HOME%\bin;”。
啟動eclipse,可以發(fā)現(xiàn)一切正常,點(diǎn)擊菜單“窗口”->首選項->Java->已安裝的JRE,可以發(fā)現(xiàn)存在一個名稱為“j2sdk”的JRE。
首先把 JDK的安裝目錄名“F:\j2sdk”改為“F:\noj2sdk”(隨便一個文件名都可以,或者去掉Path變量中的“%JAVA_HOME%\bin;”),再啟動eclipse,可以發(fā)現(xiàn)eclipse無法啟動,并出現(xiàn)如下提示:
主要是說沒有找到 Java 運(yùn)行期環(huán)境(JRE)。
由于eclipse目錄中沒有jre目錄,同時在Path變量中找不到正確的javaw執(zhí)行路徑。所以eclipse無法啟動。
解決問題的3個方法:
1.在Ms-Dos窗口中,切換到eclipse目錄,執(zhí)行 eclipse -vm F:\noj2sdk\bin\javaw,可以啟動eclipse(eclipse -vm dir-location 參數(shù)可以用到指定其他的 JRE。)。
2.復(fù)制 F:\noj2sdk目錄下的 jre目錄到eclipse目錄中, 可以啟動eclipse。
3.把“F:\noj2sdk”目錄名重新改為“F:\j2sdk”,可以啟動eclipse。
以上3個方法可以分別執(zhí)行,如果同時執(zhí)行,默認(rèn)情況下,Eclipse 首先執(zhí)行 -vm 參數(shù);如果沒有-vm參數(shù),則查找 eclipse\jre 子目錄;如果沒有找到,Eclipse 將查找在系統(tǒng)中注冊的 Java 運(yùn)行期環(huán)境。
一.介紹
1.eclipse官方網(wǎng)站:
http://www.eclipse.org
2.賽迪網(wǎng)
http://tech.ccidnet.com/pub/series/s102.html
3.Eclipse平臺入門
http://www-900.ibm.com/developerWorks/cn/linux/opensource/os-ecov/index.shtml
二.教程
3Plus4 Software
http://www.3plus4software.de/eclipse/index_en.html
Omondo
http://www.tutorial-omondo.com/
Tutorial for building J2EE Applications using JBOSS and ECLIPSE
http://www.tusc.com.au/tutorial/html/index.html
Getting Started with Eclipse and the SWT
http://www.cs.umanitoba.ca/~eclipse/
三.插件
Eclipse Plugin Resource Center and Marketplace
http://www.eclipseplugincentral.com/
eclipse-plugins
http://www.eclipse-plugins.info/eclipse/index.jsp
eclipse-workbench
http://www.eclipse-workbench.com/jsp/index.jsp
Jigloo SWT/Swing GUI Builder
http://cloudgarden.com/jigloo/
Lomboz
http://forge.objectweb.org/project/showfiles.php?group_id=97
Matrix網(wǎng)站介紹eclipse plugins
http://www.matrix.org.cn/subjects/Wiki.jsp?page=EclipsePlugins
TomcatPlugin
http://www.sysdeo.com/eclipse/tomcatPlugin.html
EasyStruts
http://easystruts.sourceforge.net
EclipseColorer plugin
http://colorer.sf.net
CVS-SSH2 Plug-in for Eclipse
http://www.jcraft.com/eclipse-cvsssh2/
JadClipse
http://jadclipse.sourceforge.net/
SWT Designer
http://www.swt-designer.com/
Hibernator
http://hibernator.sourceforge.net