hi all.

i am going through the hibernate tutorials from http://www.hibernate.org

but i cant build my project with the ant as specified,
i have used ant befor now .there is no problem with ant.

the error given is as follow ;

compile:
[javac] Compiling 2 source files to C:\Documents and Settings\Janaka Priyada
rshana\jbproject\hibernate-3.2\bin

BUILD FAILED
C:\Documents and Settings\Janaka Priyadarshana\jbproject\hibernate-3.2\build.xml
:22: 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

Total time: 1 second

the line number 22 is as follow.

<javac srcdir="${sourcedir}"
             destdir="${targetdir}"
             classpathref="libraries"/>

path tab is as follow

<path id="libraries">
        <fileset dir="${librarydir}">
            <include name="*.jar"/>
        </fileset>
    </path>

i think the problem is with a path,because it tell that can not find the javac command, but i have set the environment variables to the jdk bin directory.

but simply when i test the javac command, it is OK

please help me to solve this problem......

thank you......

Edited 3 Years Ago by happygeek: fixed formatting

what exactly did you set in your environment?
It is wrong, or ANT would work (or else you failed to install the JDK, installing the JRE instead).

no there is no problem with jdk path, when i try to compile the sorce cord with javac command, it is ok.

but when i try to run the build.xml file, it will indicate the above error

Yes, so there IS a problem.
If you don't give the information we need to help you, you won't get any help.

Remember that ant does NOT use javac.exe...

This article has been dead for over six months. Start a new discussion instead.