• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant installer javac issue

 
Mark Dahlerup
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mark Dahlerup
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic