Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Running Ant
Running Ant [message #670] Sat, 19 April 2003 23:41 Go to next message
Eclipse UserFriend
Originally posted by: ewoojava.hotmail.com

I can compile an eclipse created Java Project no problem, But when I tried
to Run Ant... on a build.xml I got the following error saying my JAVA_HOME
does not point to the JDK. I check my JAVA_HOME environment variable in
my Win 2000 machine, it has "c:\Program Files\j2sdk1.4.1_02". Would
anyone know what is my problem?

[javac] BUILD FAILED: file:D:/eclipse/workspace/Jade3/build.xml:66:
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
Re: Running Ant [message #810 is a reply to message #670] Sun, 20 April 2003 00:13 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
You need to add a jdk tools.jar to the Ant runtime classpath using the Ant
preference pages.
Another option is to start Eclipse using the -vm arg so that Eclipse is
launched using your JDK install VM (your JAVA_HOME). This way Eclipse will
automatically add
the tools.jar to the Ant runtime classpath.

HTH
Darins

"Eugene Woo" <ewoojava@hotmail.com> wrote in message
news:b7sms1$4th$1@rogue.oti.com...
> I can compile an eclipse created Java Project no problem, But when I tried
> to Run Ant... on a build.xml I got the following error saying my JAVA_HOME
> does not point to the JDK. I check my JAVA_HOME environment variable in
> my Win 2000 machine, it has "c:\Program Files\j2sdk1.4.1_02". Would
> anyone know what is my problem?
>
> [javac] BUILD FAILED: file:D:/eclipse/workspace/Jade3/build.xml:66:
> 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
>
>
Re: Running Ant [message #908 is a reply to message #810] Sun, 20 April 2003 03:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ewoojava.hotmail.com

Thanks.

Eugene
Darin Swanson wrote:

> You need to add a jdk tools.jar to the Ant runtime classpath using the Ant
> preference pages.
> Another option is to start Eclipse using the -vm arg so that Eclipse is
> launched using your JDK install VM (your JAVA_HOME). This way Eclipse will
> automatically add
> the tools.jar to the Ant runtime classpath.

> HTH
> Darins

> "Eugene Woo" <ewoojava@hotmail.com> wrote in message
> news:b7sms1$4th$1@rogue.oti.com...
> > I can compile an eclipse created Java Project no problem, But when I tried
> > to Run Ant... on a build.xml I got the following error saying my JAVA_HOME
> > does not point to the JDK. I check my JAVA_HOME environment variable in
> > my Win 2000 machine, it has "c:\Program Files\j2sdk1.4.1_02". Would
> > anyone know what is my problem?
> >
> > [javac] BUILD FAILED: file:D:/eclipse/workspace/Jade3/build.xml:66:
> > 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
> >
> >
Re: Running Ant [message #67737 is a reply to message #810] Thu, 26 June 2003 00:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: killerapp.sf.net

I added tools.jar (tried 2 different recent JDK's) and I get the
following error:

BUILD FAILED: java.lang.UnsupportedClassVersionError:
com/sun/tools/javac/Main (Unsupported major.minor version 48.0)

Darin Swanson wrote:

> You need to add a jdk tools.jar to the Ant runtime classpath using the Ant
> preference pages.
> Another option is to start Eclipse using the -vm arg so that Eclipse is
> launched using your JDK install VM (your JAVA_HOME). This way Eclipse will
> automatically add
> the tools.jar to the Ant runtime classpath.
>
> HTH
> Darins
>
> "Eugene Woo" <ewoojava@hotmail.com> wrote in message
> news:b7sms1$4th$1@rogue.oti.com...
>
>>I can compile an eclipse created Java Project no problem, But when I tried
>>to Run Ant... on a build.xml I got the following error saying my JAVA_HOME
>>does not point to the JDK. I check my JAVA_HOME environment variable in
>>my Win 2000 machine, it has "c:\Program Files\j2sdk1.4.1_02". Would
>>anyone know what is my problem?
>>
>> [javac] BUILD FAILED: file:D:/eclipse/workspace/Jade3/build.xml:66:
>>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
>>
>>
>
>
>
Re: Running Ant [message #68437 is a reply to message #67737] Thu, 26 June 2003 23:56 Go to previous message
Eclipse UserFriend
Originally posted by: darin_swanson.oti.com

The tools.jar you are adding is for a different VM version.
It looks like you are trying to use a 1.4 tools.jar with a 1.3 VM

Darins

"Killer App" <killerapp@sf.net> wrote in message
news:bddf2v$7hq$1@rogue.oti.com...
> I added tools.jar (tried 2 different recent JDK's) and I get the
> following error:
>
> BUILD FAILED: java.lang.UnsupportedClassVersionError:
> com/sun/tools/javac/Main (Unsupported major.minor version 48.0)
>
> Darin Swanson wrote:
>
> > You need to add a jdk tools.jar to the Ant runtime classpath using the
Ant
> > preference pages.
> > Another option is to start Eclipse using the -vm arg so that Eclipse is
> > launched using your JDK install VM (your JAVA_HOME). This way Eclipse
will
> > automatically add
> > the tools.jar to the Ant runtime classpath.
> >
> > HTH
> > Darins
> >
> > "Eugene Woo" <ewoojava@hotmail.com> wrote in message
> > news:b7sms1$4th$1@rogue.oti.com...
> >
> >>I can compile an eclipse created Java Project no problem, But when I
tried
> >>to Run Ant... on a build.xml I got the following error saying my
JAVA_HOME
> >>does not point to the JDK. I check my JAVA_HOME environment variable in
> >>my Win 2000 machine, it has "c:\Program Files\j2sdk1.4.1_02". Would
> >>anyone know what is my problem?
> >>
> >> [javac] BUILD FAILED:
file:D:/eclipse/workspace/Jade3/build.xml:66:
> >>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
> >>
> >>
> >
> >
> >
>
Previous Topic:JUnit Console-Output
Next Topic:Automatic JAR Creation
Goto Forum:
  


Current Time: Wed Jul 17 11:26:25 GMT 2024

Powered by FUDForum. Page generated in 0.03264 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top