ANT classpath problem

From: John M. Resler (JohnMResler_at_sbcglobal.net)
Date: 12/24/03


Date: 24 Dec 2003 02:55:02 -0800

Ok,
  I have been using Java for sometime but only recently switched to
using ANT to build my projects outside of the netbeans IDE. I am now
running into an error message that follows:
Buildfile: build.xml

init:

jjtree:

javacc:

compile:
    [javac] Compiling 1 source file to C:\unzipped\jep-2.24\build
    [javac] Fatal Error: Unable to locate package java.lang in
classpath or bootclasspath

BUILD FAILED
file:C:/unzipped/jep-2.24/build.xml:82: Compile failed; see the
compiler error output for details.

Total time: 1 second

I have read the ant manual and I have ANT_HOME, CLASSPATH and
JAVA_HOME set.
ANT_HOME is set to the top level directory : c:\JTools\ant
JAVA_HOME is set to the top level directory : c:\JTools\jdk
CLASSPATH is a bit longer but includes the %ANT_HOME%;%CLASSPATH%
variables and they are correctly (well, I thought correctly) set to
the directories with appropriate jar files on the path. Can anyone
tell me or point me to a solution?
TIA.

-John



Relevant Pages

  • Re: path to ant; ant launcher
    ... ..ant folder in /home/thufir. ... [thufir@localhost java]$ ant ... 153 # Build local classpath using just the launcher in non-rpm mode ... 158 # request optional jars and their dependencies via the ...
    (comp.lang.java.help)
  • Re: classpath problem in my machine
    ... when i run ant,the compile is done without any error.But the run ... I am working on a WinXP machine and don't have a CLASSPATH variable in ... Could it be that the Ant classpath target specifies 'lib/' as a relative directory, which is absent in the runtime environment? ... However, given that part of the purpose of a JAR is to run independently of Ant, you need to ensure that the JAR manifest correctly specifies the path and that the lib/ directory is present in the correction location relative to the JAR. ...
    (comp.lang.java.programmer)
  • Re: "ant -version" -> build.xml does not exist
    ... in my classpath. ... Daniel Dyer wrote: ... Are you certain that it is using the version of Ant you have downloaded? ... script without passing the command line arguments. ...
    (comp.lang.java.programmer)
  • javac and java -classpath with regards to ant
    ... javac. ... "The class path tells the JDK tools and applications ... Tidy.jar would be in the classpath. ... And that's what I want ant to do, ...
    (comp.lang.java.help)