本文介绍了null JavaCompiler在Eclipse中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到一些错误与我的Java编译器。我不是在Eclipse外面得到错误,但它似乎只发生在Eclipse Indigo。这不是必要的,但如果你有答案,我会非常感激它,因为它会帮助我调试,并更容易测试资源。

I am getting some errors with my Java Compiler. I am not getting errors outside of Eclipse, but it only seems to happen in Eclipse Indigo. This is not necessary, but if you have the answer, I would really appreciate it, as it would help me debug, and test the resources easier.

感谢您的阅读这个。

E:ToolProvider.getSystemJavaCompiler()返回null。

E: The ToolProvider.getSystemJavaCompiler() returns null.

E2:

推荐答案


  1. 转到 Java - > 已安装的JRE 。将您的JDK添加为运行时。您可以选择选择此JDK以用于所有FUTURE项目。但是,您的选择将不会对现有项目生效。因此跳到第2步。

  2. 选择项目的属性。

  3. 标签下,选择JRE系统库[jreblahblahblah]和编辑

  4. 选择备用JRE ,然后使用下拉菜单找到您刚添加的JDK。

  5. 项目和重建。

  1. Go to Java->Installed JREs. Add your JDK as a runtime. You may choose to select this JDK to use for all your FUTURE projects. However your selection will not take effect on existing projects. Hence onto step 2.
  2. Select your project's properties. Select Java Build Path.
  3. Under the Libraries tab, select JRE System Library [jreblahblahblah] and Edit it.
  4. Select Alternate JRE and use the dropdown to find the JDK that you just added.
  5. Clean your project and rebuild.

这篇关于null JavaCompiler在Eclipse中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 16:44