[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Problems with ANT/javac

Another possibility is to add the <javac > attribute "executable=D:/path/to/javac.exe"

Darin Swanson wrote:
You need to add a jdk tools.jar to the Ant runtime classpath using the Ant
preference pages.

If you start Eclipse using the -vm arg so that Eclipse is launched using
your J2SDK install VM, Eclipse will automatically add the tools.jar to the
Ant
runtime classpath.

HTH
Darins

"Martin Dubuc" <martin.dubuc@xxxxxxxxxx> wrote in message
news:bdpscg$5jq$1@xxxxxxxxxxxxxxxx

I am trying to compile a Java program with ANT, but am experiencing some
problems.

I am using the M1 3.0 stream stable build.

When I run the javac rule from my build.xml script, I get the following
message from eclipse:

[javac] BUILD FAILED: file:.../build.xml:30: 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

I am running eclipse on Windows 98. I have set up the JAVA_HOME
environment variable to point to my J2SDK home directory. I have also
added tools.jar to the CLASSPATH environment variable. Here is how I
defined the variables in my AUTOEXEC.BAT:

SET JRE_HOME=C:\PROGRA~1\JAVA\JRE1.4.1_03
SET JAVA_HOME=C:\J2SDK1.4.1_03
SET CLASSPATH=%JRE_HOME%\LIB\EXT\COMM.JAR;%JAVA_HOME%\LIB\TOOLS.JAR

Martin