2

我收到了这个错误:

Compilation failure
Unable to locate the Javac Compiler in:
  /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.

现在我在我的.bashrc文件中设置了一些信息,如下所示export PATH=$PATH:/usr/lib/jvm/java-6-openjdk/bin:我也在我的 /etc/profile 文件中做到了。但它仍然失败。但我注意到上述错误仍在进入jre而不是jvm. 我真的不明白为什么要这样做。当我这样做时which javac,它会指示我/usr/bin/javac。那个文件到底是什么?似乎 Ubuntu 默认使用 JRE 而不是 SDK。无论哪种方式,我都对如何解决这个问题感到困惑。任何帮助,将不胜感激!

4

0 回答 0