null JavaCompiler in Eclipse

后端 未结 2 623
走了就别回头了
走了就别回头了 2021-01-18 12:36

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

相关标签:
2条回答
  • 2021-01-18 13:12

    It happens when you use the JRE as Standard VM in Eclipse. Please use the JDK as Standard VM. It will work then.

    Have a look at this.

    For more information in setting the java VM see Running Eclipse#Setting the java VM

    0 讨论(0)
  • 2021-01-18 13:28
    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.
    0 讨论(0)
提交回复
热议问题