• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ant installer javac issue

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Make yourself as serene as a flower, as a tree. And on wednesdays, as serene as this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic