Where does Eclipse find javac to compile a project?

后端 未结 3 419
鱼传尺愫
鱼传尺愫 2021-01-04 04:28

Here is what I have:

JAVA_HOME=C:\\Software\\Java\\jdk1.5.0_12 (points to JDK 5.0)

In Eclipse \"Installed Runtimes\" I have: jre 1.5.0_12 (points to JRE 5.0)

相关标签:
3条回答
  • 2021-01-04 05:06

    Eclipse has the JDT which includes the incremental compiler so it does not need an external one unless that is your wish :)

    0 讨论(0)
  • 2021-01-04 05:16

    Eclipse is shipped with an built-in compiler. You can use an external JDK, if you configure it in the preferences.

    Edit: Thanks to André!

    0 讨论(0)
  • 2021-01-04 05:20

    Eclipse has a list of installed JRE's under window->preferences->java->Installed JRE's. The one selected as the default will be the one included with Eclipse, but you can easily add any other JRE's from this same preference pane, and select any default you wish.

    This will be the system wide default, which can be overridden on a project by project basis from the Build Path->Libraries tab. To change, select Add Library->JRE System Library and choose from your configured JRE's. Then remove the library for the default.

    0 讨论(0)
提交回复
热议问题