|
我安装好了j2sdk1.4.1路径为 /usr/local/lib 后来又ln 到/usr/local/eclipse/j2sdk1.4.1
安装了eclipse 路径为 /usr/local/eclipse
我是参考这个设置的:
linux下安装配置方法:
到java.sun.com下载:j2sdk-1_4_2_04-linux-i586.bin.
保存到/mnt/下,然后su切换到root用户,
cd /usr/local/
chmod +x j2sdk-1_4_2_04-linux-i586.bin
然后按照提示,一路空格或是输入accept或者回车之后,安装完成。
然后
cd /usr/local/
ln -s j2sdk1.4.2_04 java
cat >>/etc/profile
输入或者粘贴以下内容:
JAVA_HOME=/usr/local//eclipse/j2sdk1.4.1
CLASSPATH=.:/usr/local/eclipse/j2sdk1.4.1/lib/dt.jar:/usr/local/eclipse/j2sdk1.4.1/lib/tools/jar
PATH=/usr/local/eclipse/j2sdk1.4.1/binPATH
export PATH JAVA_HOME CLASSPATH
按ctrl+d保存退出。然后运行
source /etc/profile
当我双击eclipse图标时出现如下出错提示:
A Java Runtime Environment (JRE) or Java Development Kit (JDK)
must be available in order to run Eclipse. No Java virtual machine
was found after searching the following locations:
/usr/local/eclipse/jre/bin/java
'java' in your current PATH
我看到网上有好几种设置方法,我都懵了,我以上的设置那里出错,请指教 |
|