First, what version of gradle are you using?
Second, is JAVA_HOME normally unset in your system and user environment, and you set it per command shell? It appears that your compile operation is probably happening in a forked JVM, so you might be running into http://issues.gradle.org/browse/GRADLE-1639 or an unidentified related issue. -Spencer >________________________________ > From: Milan Papzilla <[email protected]> >To: [email protected] >Sent: Thursday, February 23, 2012 8:57 AM >Subject: [gradle-user] Compiler not found when running :compileJava > >Hello, > >I just started using gradle and I face this strange issue I was not able to >resolve so far. >I want to compile some java classes and for some reason the compiler is not >found. > >When running the :compileJava Task it shows me the right JAVA_HOME path. >but it all ends up with >> Unable to find a javac compiler; >com.sun.tools.javac.Main is not on the classpath. >Perhaps JAVA_HOME does not point to the JDK. >It is currently set to "C:\Programme\Java\jre6" > >I have looked and ensured that JAVA_HOME is correct set. > >Any suggestions how to solve this ? > >Regards >Milan > >PS: here the complete log output > >[sts] ----------------------------------------------------- >[sts] Starting Gradle build for the following tasks: >[sts] :hello >[sts] :compileJava >[sts] JAVA_HOME is set to 'J:\Java\jdk6\jdk_14\bin' >[sts] ----------------------------------------------------- >Source Set: main Java source >Source Set: test Java source >:hello >Hello world! >:compileJava > >FAILURE: Build failed with an exception. > >* What went wrong: >Execution failed for task ':compileJava'. >> Unable to find a javac compiler; >com.sun.tools.javac.Main is not on the classpath. >Perhaps JAVA_HOME does not point to the JDK. >It is currently set to "C:\Programme\Java\jre6" > >-- >View this message in context: >http://gradle.1045684.n5.nabble.com/Compiler-not-found-when-running-compileJava-tp5508085p5508085.html >Sent from the gradle-user mailing list archive at Nabble.com. > >--------------------------------------------------------------------- >To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > >
