Current position:  Home > Default > Compile error : "unable to find javac compiler"

Compile error : "unable to find javac compiler"

Time:November 30
Advertisement
Hello,
I've got this problem compiling my java project: the error that I get is :
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.5.0_05\lib\tools.jar
init:
compile:
[javac] Compiling 9 source files to H:\project\class
BUILD FAILED
H:\project\build.sml:8: Unable to find a javac compiler;
com.sun.tools.Main is not on the classpath.
Perhaps JAVA_HOME does not point to th JDK
I'm using the following product:
a)     MySQL Database: mysql-4.1.13a-win32.zip (http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-4.1.13a-win32.zip/from/pick)
b)     MySQL JDBC driver: mysql-connector-java-3.1.10.zip (http://dev.mysql.com/downloads/connector/j/3.1.html )
c)     JBuilder 2005: http://www.borland.com/downloads/download_jbuilder.html
d)     Jakarta Ant: apache-ant-1.6.5-bin.zip (http://ant.apache.org/bindownload.cgi)
In the C:\Program Files\JAVA map are the following maps:
- jdk1.5.0_05
- jre1.5.0_05
the settings in windows:
ANT_HOME C:\java\apache-ant-1.6.5
JAVA_HOME C:\Program Files\Java\jdk1.5.0_05
And I have added ;C:\java\apache-ant-1.6.5\bin; to the PATH
Why doesn't it work ? And more important, How can I fix it ?
Thanks
Nick
Advertisement
Hello,
I've got this problem compiling my java project: the error that I get is :
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.5.0_05\lib\tools.jar
init:
compile:
[javac] Compiling 9 source files to H:\project\class
BUILD FAILED
H:\project\build.sml:8: Unable to find a javac compiler;
com.sun.tools.Main is not on the classpath.
Perhaps JAVA_HOME does not point to th JDK
I'm using the following product:
a)     MySQL Database: mysql-4.1.13a-win32.zip (http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-4.1.13a-win32.zip/from/pick)
b)     MySQL JDBC driver: mysql-connector-java-3.1.10.zip (http://dev.mysql.com/downloads/connector/j/3.1.html )
c)     JBuilder 2005: http://www.borland.com/downloads/download_jbuilder.html
d)     Jakarta Ant: apache-ant-1.6.5-bin.zip (http://ant.apache.org/bindownload.cgi)
In the C:\Program Files\JAVA map are the following maps:
- jdk1.5.0_05
- jre1.5.0_05
the settings in windows:
ANT_HOME C:\java\apache-ant-1.6.5
JAVA_HOME C:\Program Files\Java\jdk1.5.0_05
And I have added ;C:\java\apache-ant-1.6.5\bin; to the PATH
Why doesn't it work ? And more important, How can I fix it ?
Thanks
Nick