|||
1.下载:sudo apt-get install sun-java-jdk6 下载开发包。下载下来的默认路径是/usr/lib/jvm/java-6-sun
2.配置:打开 /etc/profile添加以下内容:
JAVA_HOME=/usr/lib/jvm/java-6-sun
PATH=$PATH:/usr/lib/jvm/java-6-sun/bin
CLASSPATH=.:/usr/lib/jvm/java-6-sun/lib
3检查:
命令java -version检查版本
命令which java检查路径