Ubuntu10.04设置

 

安装sun jdk

$ sudo vim /etc/apt/sources.list

添加源:

deb http://archive.canonical.com/  lucid partner

 保存,然后:

$ sudo apt-get update
$ sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
$ sudo apt-get install sun-java6-plugin

  如果系统已经装了openjdk, 运行

$ sudo update-alternatives --config java 

 选择sun的jdk

设置环境变量

$ sudo gedit /etc/environment 

 添加

CLASSPATH=.:/usr/lib/jvm/java-6-sun/lib
JAVA_HOME=/usr/lib/jvm/java-6-sun

你可能感兴趣的:(java,jvm,jdk,vim,sun)