LINUX下安装并配置JAVA,eclipse环境

3121阅读 0评论2009-12-01 dongyue91
分类:LINUX

下载安装包
jdk-6u18-ea-bin-b05-linux-i586-18_nov_2009.bin

eclipse-jee-galileo-SR1-linux-gtk.tar.gz



sudo ./jdk-6u18-ea-bin-b05-linux-i586-18_nov_2009.bin
sudo mv jdk1.6.0 /usr/local/jdk1.6

tar zxvf eclipse-jee-galileo-SR1-linux-gtk.tar.gz
mv eclipse /usr/software/eclipse

//配置环境变量
vim /home/$USER/.bashrc

增加:
JAVA_HOME=/usr/local/jdk1.6
JRE_HOME=/usr/local/jdk1.6/jre
PATH=$PATH:/usr/local/jdk1.6/bin:/usr/local/jdk1.6/jre/bin
CLASSPATH=.:/usr/local/jdk1.6/lib/dt.jar:/usr/local/jdk1.6/lib/tools.jar:/usr/local/jdk1.6/jre/lib:
export JAVA_HOME JRE_HOME PATH CLASSPATH
保存后退出

使环境变量生效
source /home/$USER/.bashrc


启动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: d:\eclipse\eclipse\jre\bin\javaw.exe javaw.exe in your current PATH


上一篇:Algorithm Gossip巴斯卡(Pascal)
下一篇:Ubuntu下配置JAVA环境 netbeans美化