实例java的安装路径为/opt
1.下载java
2.安装java
3.根据实际情况运行以下命令
QUOTE: |
alternatives--install/usr/bin/javajava/usr/java/jdk1.6.0_02/bin/java100alternatives--install/usr/bin/jarjar/usr/java/jdk1.6.0_02/bin/jar100alternatives--install/usr/bin/javacjavac/usr/java/jdk1.6.0_02/bin/javac100
/usr/sbin/alternatives--configjava
运行安装eclipse
修改eclipse.ini文件,添加
QUOTE: |
-vm
/opt/jdk1.6.0_03/jre/bin/java
注意:此设置为linux版本的linux,如果是windows的版本添加内容可能为
QUOTE: |
-vm
/opt/jdk1.6.0_03/jre/bin/javaw.exe
如不修改eclipse.ini文件,运行eclipse可能显示以下错误
QUOTE: |
JVMterminated.Exitcode=-1
-Xms40m
-Xmx256m
-Dosgi.bundlefile.limit=100
-Djava.class.path=/opt/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070606.jar
-oslinux
-wsgtk
-archx86
-showsplash/opt/eclipse//plugins/org.eclipse.platform_3.3.0.v20070613/splash.bmp
-launcher/opt/eclipse/eclipse
-nameEclipse
--launcher.library/opt/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.0.v20070606/eclipse_1017a.so
-startup/opt/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070606.jar
-vm/opt/jdk1.6.0_03/bin/../jre/lib/i386/client/libjvm.so
-vmargs
-Xms40m
-Xmx256m
-Dosgi.bundlefile.limit=100
-Djava.class.path=/opt/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070606.jar
下载本文示例代码
阅读(238) | 评论(0) | 转发(0) |