linux安装JDK
第一次linux安装jdk
如下
[root@pst java]# chmod +x jdk-6u45-linux-i586-rpm.bin
[root@pst java]# ./jdk-6u45-linux-i586-rpm.bin
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-6u45-linux-i586.rpm
inflating: sun-javadb-common-10.6.2-1.1.i386.rpm
inflating: sun-javadb-core-10.6.2-1.1.i386.rpm
inflating: sun-javadb-client-10.6.2-1.1.i386.rpm
inflating: sun-javadb-demo-10.6.2-1.1.i386.rpm
inflating: sun-javadb-docs-10.6.2-1.1.i386.rpm
inflating: sun-javadb-javadoc-10.6.2-1.1.i386.rpm
Preparing... ########################################### [100%]
package jdk-1.6.0_45-fcs.i586 is already installed
Done.
[root@pst java]# rpm -ivh jdk-6u45-linux-i586.rpm
Preparing... ########################################### [100%]
package jdk-1.6.0_45-fcs.i586 is already installed
[root@pst java]# java -version
bash: /usr/bin/java: No such file or directory
[root@pst java]# cd ~/
[root@pst ~]# java
bash: /usr/bin/java: No such file or directory
export JAVA_HOME=/usr/local/java/jdk-1.6.0_45-fcs
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOMR/bin
提示已安装,但找不到jdk-1.6.0_45-fcs.i586 目录 而且命令查找版本等均无效
------解决方案--------------------在 /usr 下 用find 命令找一下
------解决方案--------------------好像 一般是在 usr/java下 不是在usr/local/java
如果没有,看楼上,用find找
------解决方案--------------------