DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43794>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43794

           Summary: Message about JAVA_HOME is confusing
           Product: Ant
           Version: 1.7.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: [EMAIL PROTECTED]


When using the AntBuilder in Groovy, the following error message occurs when
trying to use the Javac task:

Caught: : 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 "/usr/lib/jvm/java-6-sun-1.6.0.03/jre"
        at GROOVY_2258.run(GROOVY_2258.groovy:5)
        at GROOVY_2258.main(GROOVY_2258.groovy)

The Ant problem here is that the JAVA_HOME mentioned here is not the user's
environment variable JAVA_HOME.  Instead I believe it relates to the variable
JAVA_HOME in src/main/org/apache/tools/ant/util/JavaEnvUtils.java.  Although
there is a relationship between the paths involved, the variable JAVA_HOME is
more directly related to System.getProperty ( "java.home" ) than to
System.getenv ( "JAVA_HOME" ) -- the former refers to the JRE whereas the latter
 will point a directory higher.

Clearly this is not an issue to the correct execution on Ant in and of itself.
However for any system (such as Groovy) that uses the Ant jars programmatically,
this is actually a real problem.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to