![Java 已安装,命令不起作用](https://linux22.com/image/833589/Java%20%E5%B7%B2%E5%AE%89%E8%A3%85%EF%BC%8C%E5%91%BD%E4%BB%A4%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
我已经安装了 java,但无法运行任何 java 命令!下面显示了我尝试运行 java 命令时得到的结果:
sultan@ubuntu:~$ java
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
* gcj-4.5-jre-headless
* openjdk-7-jre-headless
Try: sudo apt-get install <selected package>
sultan@ubuntu:~$ sudo apt-get install openjdk-7-jre
[sudo] password for sultan:
Reading package lists... Done
Building dependency tree
Reading state information... Done
openjdk-7-jre is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.