dengyin2000 发表于 2013-2-7 07:13:47

在linux系统中安装最新版的jdk


[*]Download the installation package @ http://java.sun.com, we choose the Linux package (not RPM though) to download.
[*]Copy and execute the downloaded .bin filesudo cp jdk-6u6-linux-i586.bin /opt      # We are going to install the package under /optcd /optsudo ./jdk-6u6-linux-i586.bin# Click space button to read through the license agreement, and input "yes" when being prompted.
[*]Make a symbolic link to make the life easier in the futuresudo ln -s ./jdk1.6.0_06/ ./jdk1.6# From now on, you can point the JAVA_HOME to /opt/jdk1.6
[*]Put Java into system alternatives:sudo alternatives --install /usr/bin/java java /opt/jdk1.6/bin/java 1sudo alternatives --config java# You would see the following screen:There is 1 program that provides 'java'.Selection    Command-----------------------------------------------*+ 1         /opt/jdk1.6/bin/javaEnter to keep the current selection[+], or type selection number:# We don't have other options, so just select 1.
注意的一点是在ubuntu中alternatives用update-alternatives替换。
页: [1]
查看完整版本: 在linux系统中安装最新版的jdk