Hi Allan,
On May 7, 2008, at 4:01 PM, Allan Lewis wrote:
I'm having an issue now where code that works when run via command
line/Eclipse fails when run through Gradle. I'm sure that I have
the same
set of JARs on the classpath in both cases. I had a similar issue
a while
back when trying to run as an Ant task, which I never resolved.
I need to track this down further and come up with a test case, but
is there
anything obvious you can point me at in the meantime? What is
different
about classpaths and classloading when running within the context of a
Gradle build?
Have a look at the class org.gradle.ToolsMain.
http://svn.codehaus.org/gradle/gradle-core/trunk/src/main/groovy/org/
gradle/ToolsMain.java
This is the class which gets called by the gradle start script.
It adds the tools.jar to the classpath when com.sun.tools.javac.Main
can't be found in the classpath. If you start Gradle, at the very
beginning of the output you find the message "Modern compiler found."
or "No modern compiler." Which of those messages is printed on your
machine? If there is no modern compiler (e.g. Sun JDK's for Linux and
Windows) we set a new Context Classloader to the executing thread.
I'm not sure if this has anything to do with your problems.
Of course I'm very much interested in any code that reproduces this
problem.
- Hans
--
View this message in context: http://www.nabble.com/Classpaths-
classloaders-in-Gradle-tp17105685p17105685.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
--
Hans Dockter
Gradle Project lead
http://www.gradle.org