Dec 17 2006

Solution to “Error starting modern compiler”

Published by pj at 12:35 am under eclipse,java,opensource

The eclipse/java error “Error starting modern compiler” when trying to compile something using javac in eclipse is being caused by eclipse using a different java VM than the one JAVA_HOME is pointing to.

Other keywords:

  • eclipse compile error
  • “13: Error starting modern compiler”
  • eclipse cannot compile

29 responses so far

29 Responses to “Solution to “Error starting modern compiler””

  1. Ricardoon 22 Apr 2008 at 11:28 am

    very useful, thanks !!

  2. Amiron 23 May 2008 at 3:14 pm

    Thanx a bunch for the tip. It worked.

  3. Maxon 13 Aug 2008 at 8:24 pm

    Thanks a lot for the tip! Was finally able to resolve this problem after many unsuccessful attempts.

  4. juson 12 Sep 2008 at 9:28 pm

    Thanks it worked like charm :)

  5. Tomon 21 Jan 2009 at 10:04 am

    thanks!

  6. Taoon 29 Jan 2009 at 12:14 am

    thanks a lot!

  7. Xavieron 03 Mar 2009 at 10:10 pm

    THX man, great help!

  8. CHOI, SENG-ILon 30 Mar 2009 at 9:37 am

    thanks a lot !!

  9. Satishon 20 Apr 2009 at 5:11 pm

    Thanks a lot.

  10. jagadeeshon 06 Jun 2009 at 1:11 pm

    thanks

  11. nizhon 24 Jun 2009 at 4:08 pm

    thanks a lot

  12. ijazon 13 Jul 2009 at 9:23 am

    thanks a lot :)

  13. Chrison 14 Sep 2009 at 6:14 pm

    Correct explanation.

    But you also need to mention that once the Java VM has been changed in Eclipse, it needs to be restarted before Ant build.xml is being executed again or else the error will still remain.

  14. Erichon 08 Oct 2009 at 11:18 am

    Althought changing my VM the error raises again.
    Reason: I changed to a JRE (!) as VM. So Eclipse still uses the tools.jar from the unwanted (JDK) VM (see Dialog: External Tools -> Classpath->Additional Tasks&Support)
    By changing to the wanted JDK(!) VM the error disappear :-)

  15. Antalason 13 Oct 2009 at 3:05 pm

    My 2 cent: above recipes didn’t work in my case. Setting -Xmx1024m for Ant Run Configuration in Eclipse is what ailed me. Cheers!

  16. [...] Google was just a browser away, and I discovered through pitr’s blog that I needed to update the JVM used by Eclipse to the same as pointed at by [...]

  17. Avaon 17 Nov 2009 at 5:04 pm

    Could you maybe write how i can fix that exactly? I mean changing the VM so that both use the same?

  18. Desion 24 Nov 2009 at 9:36 pm

    Thanks! It worked wonders :)

  19. Kiranon 02 Dec 2009 at 8:47 am

    Great. It worked. Earlier I was playing with Java 1.5 and 1.6 which caused this problem.

    But, I had to restart Eclipse IDE after changing the JAVA_HOME environment variable on Windows.

  20. vivekon 30 Dec 2009 at 12:13 pm

    Thanks, it saved my day!!

  21. JACKon 04 Jan 2010 at 3:30 pm

    thanks ! save my day!!

  22. Isuruon 09 Feb 2010 at 7:00 am

    changing the VM so that both use the same

    This is the solution..

  23. sandeepon 17 Feb 2010 at 11:44 am

    thanks mate !!, it helped a lot :)

  24. etienne_sfon 19 Feb 2010 at 1:38 pm

    Excellent !

    Thanks for this one.

    Etienne

  25. Gregon 17 Mar 2010 at 8:16 pm

    -Xmx1024m is what worked for me, why I’m not 100% sure. I’m guessing my project reached a point in terms of size that it caused the compiler to die. Weird. Anyhow just in case you see this error and you know your JVM is set up correctly try adding -Xmx1024m.

  26. [...] a solução aqui:  http://www.pitr.net/index.php/2006/12/17/error-starting-modern-compiler/ Share/SaveLeia mais: About (37.5%) similaridadeThe method getELContext() is undefined for the type [...]

  27. sarathon 23 Jun 2010 at 1:39 pm

    Whoa… it worked :)

  28. Cristion 29 Jul 2010 at 9:29 am

    Thanks. It worked like a charm.

  29. leonardon 06 Aug 2010 at 5:40 pm

    Thanks dude!!!… this is the solution! :D

Trackback URI | Comments RSS

Leave a Reply