javac 在 ubuntu 终端中不起作用
当我尝试编译一个java程序时,我得到一个错误:javac
The program 'javac' can be found in the following packages:
* default-jdk
* ecj
* gcj-4.6-jdk
* gcj-4.7-jdk
* openjdk-7-jdk
* openjdk-6-jdk
Try: sudo apt-get install <selected package
当我尝试java版本时,它说,
java version "1.7.0_21"
OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-1ubuntu1)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
当我尝试我得到哪个java时/usr/bin/java
如何从命令行编译我的Java程序?