trouble with Hibernate and Ant (probably just Ant)

Discussion in 'Java' started by john martin, Apr 7, 2005.

  1. john martin

    john martin Guest

    I'm planning on using Hibernate for persistence in an application I'm
    writing, but am having some trouble initially building Hibernate. I've
    unzipped it into a directory, run the build batch file (I'm doing this
    on Windows 2000), and I get the following errors:


    "Unable to locate tools.jar. Expected to find it in C:\Program
    Files\Java\jre1.5.0\lib\tools.jar"

    (despite the fact that JAVA_HOME is set to "C:\Program
    Files\Java\jdk1.5.0" which does contain tools.jar under lib)


    "BUILD FAILED
    C:\Documents and Settings\Administrator\My
    Documents\code\third_party_packages\h
    ibernate-3.0\build.xml:195: 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"

    (however, JAVA_HOME definitely points to the JDK).



    I'm guessing this is an Ant issue, since the build script invokes Ant,
    and that there's some issue with either my JAVA_HOME or CLASSPATH.
    Also, my PATH does include the folder with the javac executable, though
    it seems that the compiler's being invoked from the JVM and not the
    command line. What should I make sure is set as far as environment
    variables go? Is there anything I have to be change of in the batch
    file or the Ant build script?


    Any help would be much appreciated (I'm working on a neglected pet
    project of mine that I'd like to start coding on again).
    john martin, Apr 7, 2005
    #1
    1. Advertising

  2. john martin

    john martin Guest

    john martin wrote:

    > go? Is there anything I have to be change of in the batch file or the
    > Ant build script?


    sorry, i meant "have to change or be aware of"...
    john martin, Apr 7, 2005
    #2
    1. Advertising

  3. john martin

    john martin Guest

    john martin wrote:
    > I'm planning on using Hibernate for persistence in an application I'm
    > writing, but am having some trouble initially building Hibernate. I've
    > unzipped it into a directory, run the build batch file (I'm doing this
    > on Windows 2000), and I get the following errors:
    >
    >
    > "Unable to locate tools.jar. Expected to find it in C:\Program
    > Files\Java\jre1.5.0\lib\tools.jar"
    >
    > (despite the fact that JAVA_HOME is set to "C:\Program
    > Files\Java\jdk1.5.0" which does contain tools.jar under lib)
    >
    >
    > "BUILD FAILED
    > C:\Documents and Settings\Administrator\My
    > Documents\code\third_party_packages\h
    > ibernate-3.0\build.xml:195: 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"
    >
    > (however, JAVA_HOME definitely points to the JDK).
    >
    >
    >
    > I'm guessing this is an Ant issue, since the build script invokes Ant,
    > and that there's some issue with either my JAVA_HOME or CLASSPATH. Also,
    > my PATH does include the folder with the javac executable, though it
    > seems that the compiler's being invoked from the JVM and not the command
    > line. What should I make sure is set as far as environment variables
    > go? Is there anything I have to be change of in the batch file or the
    > Ant build script?
    >
    >
    > Any help would be much appreciated (I'm working on a neglected pet
    > project of mine that I'd like to start coding on again).


    also, manually adding tools.jar to the classpath didn't change anything.
    is there a reason Ant wouldn't use the JAVA_HOME and CLASSPATH
    information from the system-wide environment variables?

    thanks again for any help...
    john martin, Apr 7, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ilias Lazaridis
    Replies:
    0
    Views:
    1,704
    Ilias Lazaridis
    Dec 27, 2004
  2. Replies:
    0
    Views:
    3,669
  3. jstorta
    Replies:
    1
    Views:
    11,708
  4. Eleanna Skouta
    Replies:
    2
    Views:
    8,380
    Arne Vajhøj
    Dec 9, 2008
  5. Amit Jain
    Replies:
    7
    Views:
    3,259
    Amit Jain
    Apr 27, 2009
Loading...

Share This Page