[color=red]1. Change the file permission as follows. [/color]
chmod a+x jdk-xx-xxx.bin
[color=red]2. Run the bin file to start the installation.[/color]
./jdk-xx-xxx.bin
Unpacking...
Checksumming...
Extracting...
...
...
[color=red]A directory will be created under "/usr/java" with the JDK version name, which will consists of all the jdk files.[/color]
[color=red]3. You can export the Java home to create it as an environment variable.[/color]
export JAVA_HOME=/usr/java/jdk1.6.x_xx
export PATH=$JAVA_HOME/bin:$PATH
[color=red]4. you can verify the JDK version installed on your system by issuing the following command.[/color]
which java
[b]# chmod +x jdk-6u23-linux-i586-rpm.bin //给所有用户添加可执行的权限
或
# chmod 755 jdk-6u23-linux-i586-rpm.bin //更改文件权限为755[/b]
使用echo命令检查jdk环境变量配置情况。
# echo $JAVA_HOME
# echo $CLASSPATH
# echo $PATH
卸载Linux自带的jdk
不卸载,可能使用jdk的时候,使用的是自带的。
在终端shell下执行命令:
[b]rpm -qa | grep gcj[/b]
会列出一些东西如:java-1.4.2-gcj-compat-1.4.2.0-27jpp等,删除含有java字串的软件包
[b]rpm -e --nodeps java-1.4.2-gcj-compat-1.4.2.0-27jpp[/b]
或者在Applications->Add and Remove Software中找到java开头的包进行删除。
--------------------------------------------------------------------------
chmod a+x jdk-xx-xxx.bin
[color=red]2. Run the bin file to start the installation.[/color]
./jdk-xx-xxx.bin
Unpacking...
Checksumming...
Extracting...
...
...
[color=red]A directory will be created under "/usr/java" with the JDK version name, which will consists of all the jdk files.[/color]
[color=red]3. You can export the Java home to create it as an environment variable.[/color]
export JAVA_HOME=/usr/java/jdk1.6.x_xx
export PATH=$JAVA_HOME/bin:$PATH
[color=red]4. you can verify the JDK version installed on your system by issuing the following command.[/color]
which java
[b]# chmod +x jdk-6u23-linux-i586-rpm.bin //给所有用户添加可执行的权限
或
# chmod 755 jdk-6u23-linux-i586-rpm.bin //更改文件权限为755[/b]
使用echo命令检查jdk环境变量配置情况。
# echo $JAVA_HOME
# echo $CLASSPATH
# echo $PATH
卸载Linux自带的jdk
不卸载,可能使用jdk的时候,使用的是自带的。
在终端shell下执行命令:
[b]rpm -qa | grep gcj[/b]
会列出一些东西如:java-1.4.2-gcj-compat-1.4.2.0-27jpp等,删除含有java字串的软件包
[b]rpm -e --nodeps java-1.4.2-gcj-compat-1.4.2.0-27jpp[/b]
或者在Applications->Add and Remove Software中找到java开头的包进行删除。
--------------------------------------------------------------------------