aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant installer javac issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant installer javac issue" Watch "Ant installer javac issue" New topic
Author

Ant installer javac issue

Mark Dahlerup
Greenhorn

Joined: Jun 29, 2010
Posts: 8
We are using Ant Installer to deploy projects and having issues with the compiler



The error as displayed on the error tab is
BUILD FAILED
c:\temp\antinstall28\build.xml:109: The following error occurred while executing this line:
c:\temp\antinstall28\build\tds3\build-tds-deployer.xml:71: 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:\Program Files\Java\jre6"

At the being of the output tab is
Targets:tag-version
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar
Buildfile: c:\temp\antinstall29\build.xml

However, I do a echoproperties and so interesting values as JAVA_HOME is definitely set and is pointi ng to a JDK not an JRE
ANT version is 1.8.2
[echoproperties] env.JAVA_HOME=C\:\\Program Files\\Java\\jdk1.6.0_29
[echoproperties] java.home=C\:\\Program Files\\Java\\jre6

Is there a reason ANT seems to be overriding JAVA_HOME with java.home ?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

What happens when you run this from the command prompt:

%JAVA_HOME%\bin\java -version

ant.bat evaluates JAVA_HOME to determine if it correctly set and if not defaults to running java.exe from the PATH. You might have to comment out the "@echo off" statement in ant.bat to determine exactly what the issue is.


JBoss In Action
Mark Dahlerup
Greenhorn

Joined: Jun 29, 2010
Posts: 8
When I do that I get the correct answer however, I m using the "AntInstaller-beta0.8" self-extracting jar not a ant.jar file
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Do you mean this: http://antinstaller.sourceforge.net/?
Perhaps you need to submit a bug report on that site (I didn't see anything for asking questions there).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant installer javac issue