Reputation: 650
The following error is occurring while compiling my grails application. I'm using jdk-7u79-windows-x64, I already added the location 'C:\Program Files\Java\jdk1.7.0_79\bin' to my path in Environment Variables. But still the probem exist. My OS is windows 10 (64 bit) and I'm using ggts-3.6.4 (64 bit) Could anyone tell me why this is happening?
.Error | Compilation error: startup failed: General error during semantic analysis: unable to locate the java compiler com.sun.tools.javac.Main, please change your classloader settings java.lang.ClassNotFoundException: unable to locate the java compiler com.sun.tools.javac.Main, please change your classloader settings at org.codehaus.groovy.tools.javac.JavacJavaCompiler.findJavac(JavacJavaCompiler.java:190) at org.codehaus.groovy.tools.javac.JavacJavaCompiler.compile(JavacJavaCompiler.java:49) at org.codehaus.groovy.tools.javac.JavaAwareCompilationUnit.gotoPhase(JavaAwareCompilationUnit.java:102) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:548) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:517) at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:59) at org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:215) at org.codehaus.groovy.ant.Groovyc.runCompiler(Groovyc.java:1161) at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:1212)
Upvotes: 2
Views: 4333
Reputation: 157
First make sure that you have set the path correctly(I had some problems with that).
Also use the java -version
command in cmd to see if you are using the same jdk you've set or not
I had set the JAVA_HOME correctly but I had 2 other versions of jdk and the newest was shown as java version,so I deleted them and my problem was solved,hope this workes for you
Upvotes: 1
Reputation: 1312
The Groovy-Grails Tool Suite is no longer supported software. I recommend using IntelliJ IDEA instead. See my answer to this question for more details: https://stackoverflow.com/a/38938933/2970843.
Upvotes: 1