4

I am using JDK 1.8. I have set path for the JDK, JAVA_HOME, and a separate path for tools.jar.

I am still unable to compile my project and i get the following message:

enter image description here

and if I proceed it ends up with the following error:

[groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: [groovyc] General error during semantic analysis: unable to locate the java compiler com.sun.tools.javac.Main, please change your classloader settings [groovyc] [groovyc] java.lang.ClassNotFoundException: unable to locate the java compiler com.sun.tools.javac.Main, please change your classloader settings

Burt Beckwith
  • 75,342
  • 5
  • 143
  • 156

3 Answers3

0

This error comes up when you have configured JRE in your eclipse instead of JDK. See this question for how to configure JDK in eclipse. Make sure it points to a JDK and not a JRE

Community
  • 1
  • 1
Sudhir N
  • 4,008
  • 1
  • 22
  • 32
0

yes even I do every time when creating new workspace. for this Right click your project > properties Select “Java Build Path” on left, then “JRE System Library”, click Edit… Select "Workspace Default JRE" Click "Installed JREs" If you see JRE you want in the list select it (selecting a JDK is OK too) If not, click Search…, navigate to Computer > Windows C: > Program Files > Java, then click OK..

hemantgp
  • 352
  • 3
  • 7
0

I had the same issue with GGTS, resolved it using configuring the JDK instead of JRE first and restarting GGTS once will work fine.

Use java 8u31 for grails it will work fine.

Ashu
  • 2,066
  • 3
  • 19
  • 33