Perhaps JAVA_HOME does not point to the JDK.

Moderator: developers

Perhaps JAVA_HOME does not point to the JDK.

Postby Phara0h » Tue Nov 04, 2008, 3:44 am

When I try to compile with ant, this is what I get:

C:\drftpd>ant
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\li
b\tools.jar
Buildfile: build.xml

compile:
[echo] Compiling 1.4 compatible slave files
[javac] Compiling 63 source files to C:\drftpd\classes

BUILD FAILED
C:\drftpd\build.xml:140: 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"

Total time: 3 seconds


Even though my JAVA_HOME is set to C:\Program Files\Java\jdk1.6.0_10\bin as you can see here:
Image

What's causing this and how do I fix it?
Phara0h
 
Posts: 10
Joined: Mon Mar 31, 2008, 11:16 pm

Re: Perhaps JAVA_HOME does not point to the JDK.

Postby Phara0h » Tue Nov 04, 2008, 5:48 am

Had to copy C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar to C:\Program Files\Java\jre6\lib\ext

All fixed!
Phara0h
 
Posts: 10
Joined: Mon Mar 31, 2008, 11:16 pm


Return to General

Who is online

Users browsing this forum: No registered users and 3 guests

cron