Eclipse在哪里找到javac来编译项目? [英] Where does Eclipse find javac to compile a project?
问题描述
这是我有的:
JAVA_HOME = C:\Software\Java\jdk1.5.0_12(指向JDK 5.0)
JAVA_HOME=C:\Software\Java\jdk1.5.0_12 (points to JDK 5.0)
在Eclipse安装的运行时我有:
jre 1.5.0_12(指向JRE 5.0)
jre 1.6.0_3(指向JRE 6.0)一个是默认值)
In Eclipse "Installed Runtimes" I have: jre 1.5.0_12 (points to JRE 5.0) jre 1.6.0_3 (points to JRE 6.0) (this one is default)
我的PATH中没有javac(即如果我不在JDK / bin中,则无法从命令行运行javac -version)。
I do not have "javac" on my PATH (i.e. I cannot run javac -version from command line if I am not in JDK/bin).
我的项目设置为使用jre 1.6.0_3,编译器的Compliance Level设置为6.0。
My project is set to use jre 1.6.0_3 and compiler's Compliance Level is set to 6.0.
问题是:Eclipse如何能够编译我的项目?在哪里找到6.0的编译器?此外,有没有办法告诉Eclipse使用哪个编译器(即javac的路径)?
Question is: how Eclipse is able to compile my project? Where it finds a compiler for 6.0? Moreover, is there a way to tell precisely which compiler (i.e. path to javac) is used by Eclipse?
P.S。 OS XP SP2如果是相关的
P.P.S.我没有在eclipse.ini中设置任何-vm。在eclipse中,我看到eclipse.vm = C:\Program Files\Java\jre6\bin\client\jvm.dll,它仍然是一个JRE。
P.S. OS XP SP2 if it is relevant P.P.S. I do not have any -vm set in eclipse.ini. In eclipse I see eclipse.vm=C:\Program Files\Java\jre6\bin\client\jvm.dll and it is still a JRE.
推荐答案
Eclipse有 JDT ,其中包括增量编译器,所以它不需要外部的,除非是你的愿望:)
Eclipse has the JDT which includes the incremental compiler so it does not need an external one unless that is your wish :)
这篇关于Eclipse在哪里找到javac来编译项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!