7

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.

Thank you for reading this.

E: The ToolProvider.getSystemJavaCompiler() returns null.

E2: enter image description here

2 Answers2

12
  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.
Apprentice Queue
  • 2,036
  • 13
  • 13
3

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

COD3BOY
  • 11,964
  • 1
  • 38
  • 56
  • I added: -vm C:\program files\java\jdk1.6.0_30\bin To eclipse.ini, it still causes the NullPointer. Any other tips? Oh, and I made sure those lines were above the -vmargs command –  Feb 02 '12 at 04:59
  • I tried javaw.exe, and java.exe Thanks for your help, this is getting tough :/ –  Feb 02 '12 at 05:31
  • The one thing I've noticed differently is a CMD window now appears at boot for eclipse. –  Feb 02 '12 at 05:42