我使用此命令在我的CentOS 7上安装了java 6
yum install java-1.6.0-openjdk*
但是当我使用
检查java的版本时java -version
它说:bash:/ bin / java:没有这样的文件或目录
这里有关于java文件夹的输出
[root@ip-10-0-7-233 ~]# find / -name "java"
/etc/alternatives/java
/etc/pki/ca-trust/extracted/java
/etc/pki/java
/etc/java
/var/lib/alternatives/java
/usr/bin/java
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.41.x86_64/jre/bin/java
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.41.x86_64/bin/java
/usr/lib/jvm/java
/usr/lib/java
/usr/lib/jvm-exports/java
/usr/share/java
/usr/share/javadoc/java-1.6.0-openjdk/api/java
/usr/share/javadoc/java-1.6.0-openjdk/api/org/omg/stub/java
/usr/share/javadoc/java-1.6.0-openjdk/jre/api/plugin/dom/com/sun/java
/usr/share/javadoc/java
我尝试访问/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.41.x86_64/jre/bin
和/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.41.x86_64/bin
然后执行java -version
命令,但仍然遇到同样的错误。
任何帮助都会很棒!