Ant wants a JAVA_HOME or com.sun.tools.javac.Main class..... [message #28748] |
Thu, 08 May 2003 03:23  |
Eclipse User |
|
|
|
Originally posted by: pismute.doit.ajou.ac.kr
I'm trying to build a project by running Ant from inside Eclipse. All I get
is the following error-message:
[javac] BUILD FAILED: file:D:/System/http/build.xml:162: 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'm using W2K, JDK1.4.2, eclipse2.1
Where to set JAVA_HOME? Nothing works, neither setting the environment-var
in Eclipse (Preferences - Java - Classpath variables) nor setting it in W2K
Workspace.
Any suggestions?
|
|
|
|
|
|
|
|
Re: Ant wants a JAVA_HOME or com.sun.tools.javac.Main class..... [message #29687 is a reply to message #29487] |
Fri, 09 May 2003 15:51   |
Eclipse User |
|
|
|
Originally posted by: magellan94.hotmail.com
Thanks, Darin. Do you know when eclipse plans to release a milestone drop?
The eclipse 2.2 project plan had a drop scheduled for May 2nd, and if it's
coming in the next few days I'll wait for it. Otherwise I'll grab the
integration build.
Thanks,
Dave
"Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message
news:b9esta$s5e$1@rogue.oti.com...
> Dave,
>
> You have a few options open to you:
> Take the latest Eclipse integration builds where you can specify the
JRE
> used to launch Ant (run Ant in a separate VM).
> This is still a work in progress..see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=24129
>
> You can specify the source and target using the appropriate attributes
> on the javac task
> For example <javac target="1.3" source="1.4" ...
>
> HTH
> Darins
>
> "Dave Smith" <magellan94@hotmail.com> wrote in message
> news:b9ekki$nl4$1@rogue.oti.com...
> > Is it possible to configure ANT to use a JRE other than the one used to
> > launch eclipse? I get a related error when I run a build script from
> > eclipse:
> > [javac]
E:\mydocs\projects\main\peso\src\com\oxygen\wms\proposal\Pro posal
> >
> > Bo.java:41: cannot access java.lang.Object
> >
> > [javac] bad class file:
E:\java\j2sdk1.4.2\jre\lib\rt.jar(java/lang/Objec
> >
> > t.class)
> >
> > [javac] class file has wrong version 48.0, should be 47.0
> >
> > [javac] Please remove or make sure it appears in the correct
subdirectory
> >
> > of the classpath.
> >
> >
> >
> > I need for ant to use rt.jar and tools.jar from JDK 1.3, but I use JDK
1.4
> > to run eclipse.
> >
> > Thanks,
> > Dave
> >
> > "Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message
> > news:b9e7hp$dji$1@rogue.oti.com...
> > > Exactly how did you add the JDK's tools.jar to the Ant runtime
> classpath?
> > > We did have https://bugs.eclipse.org/bugs/show_bug.cgi?id=36574
> > >
> > > Darins
> > >
> > > "Jerry III" <jerryiii@hotmail.com> wrote in message
> > > news:b9e2p4$9kb$1@rogue.oti.com...
> > > > I'm having the problem even though I did add JDK's tools.jar to
Ant's
> > > > runtime classpath. It seems that fix is not working and you would
need
> > to
> > > > start Eclipse in JDK VM to get Ant to work (compile Java files).
> > > >
> > > > Jerry
> > > >
> > > > "Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message
> > > > news:b9do9e$vm2$1@rogue.oti.com...
> > > > >
> > > > > You do not need to set JAVA_HOME it is not used in this context.
> > > > >
> > > > > You need to add a jdk tools.jar to the Ant runtime classpath using
> the
> > > Ant
> > > > > preference pages.
> > > > >
> > > > > Are you sure you are starting Eclipse with JDK 1.4.2?
> > > > > If you start Eclipse using the -vm arg so that Eclipse is launched
> > using
> > > > > your JDK install VM, Eclipse will automatically add the tools.jar
to
> > the
> > > > Ant
> > > > > runtime classpath.
> > > > >
> > > > > HTH
> > > > > Darins
> > > > >
> > > > >
> > > > > "ChangWoo Park" <pismute@doit.ajou.ac.kr> wrote in message
> > > > > news:b9d0k5$chj$1@rogue.oti.com...
> > > > > > I'm trying to build a project by running Ant from inside
Eclipse.
> > All
> > > I
> > > > > get
> > > > > > is the following error-message:
> > > > > >
> > > > > > [javac] BUILD FAILED: file:D:/System/http/build.xml:162:
> > 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'm using W2K, JDK1.4.2, eclipse2.1
> > > > > >
> > > > > > Where to set JAVA_HOME? Nothing works, neither setting the
> > > > environment-var
> > > > > > in Eclipse (Preferences - Java - Classpath variables) nor
setting
> it
> > > in
> > > > > W2K
> > > > > > Workspace.
> > > > > >
> > > > > > Any suggestions?
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
Re: Ant wants a JAVA_HOME or com.sun.tools.javac.Main class..... [message #29689 is a reply to message #29687] |
Fri, 09 May 2003 15:56  |
Eclipse User |
|
|
|
I have not heard of a date for the next milestone.
Darins
"Dave Smith" <magellan94@hotmail.com> wrote in message
news:b9h103$7rm$1@rogue.oti.com...
> Thanks, Darin. Do you know when eclipse plans to release a milestone drop?
> The eclipse 2.2 project plan had a drop scheduled for May 2nd, and if it's
> coming in the next few days I'll wait for it. Otherwise I'll grab the
> integration build.
>
> Thanks,
> Dave
>
> "Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message
> news:b9esta$s5e$1@rogue.oti.com...
> > Dave,
> >
> > You have a few options open to you:
> > Take the latest Eclipse integration builds where you can specify the
> JRE
> > used to launch Ant (run Ant in a separate VM).
> > This is still a work in progress..see
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=24129
> >
> > You can specify the source and target using the appropriate
attributes
> > on the javac task
> > For example <javac target="1.3" source="1.4" ...
> >
> > HTH
> > Darins
> >
> > "Dave Smith" <magellan94@hotmail.com> wrote in message
> > news:b9ekki$nl4$1@rogue.oti.com...
> > > Is it possible to configure ANT to use a JRE other than the one used
to
> > > launch eclipse? I get a related error when I run a build script from
> > > eclipse:
> > > [javac]
> E:\mydocs\projects\main\peso\src\com\oxygen\wms\proposal\Pro posal
> > >
> > > Bo.java:41: cannot access java.lang.Object
> > >
> > > [javac] bad class file:
> E:\java\j2sdk1.4.2\jre\lib\rt.jar(java/lang/Objec
> > >
> > > t.class)
> > >
> > > [javac] class file has wrong version 48.0, should be 47.0
> > >
> > > [javac] Please remove or make sure it appears in the correct
> subdirectory
> > >
> > > of the classpath.
> > >
> > >
> > >
> > > I need for ant to use rt.jar and tools.jar from JDK 1.3, but I use JDK
> 1.4
> > > to run eclipse.
> > >
> > > Thanks,
> > > Dave
> > >
> > > "Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message
> > > news:b9e7hp$dji$1@rogue.oti.com...
> > > > Exactly how did you add the JDK's tools.jar to the Ant runtime
> > classpath?
> > > > We did have https://bugs.eclipse.org/bugs/show_bug.cgi?id=36574
> > > >
> > > > Darins
> > > >
> > > > "Jerry III" <jerryiii@hotmail.com> wrote in message
> > > > news:b9e2p4$9kb$1@rogue.oti.com...
> > > > > I'm having the problem even though I did add JDK's tools.jar to
> Ant's
> > > > > runtime classpath. It seems that fix is not working and you would
> need
> > > to
> > > > > start Eclipse in JDK VM to get Ant to work (compile Java files).
> > > > >
> > > > > Jerry
> > > > >
> > > > > "Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message
> > > > > news:b9do9e$vm2$1@rogue.oti.com...
> > > > > >
> > > > > > You do not need to set JAVA_HOME it is not used in this context.
> > > > > >
> > > > > > You need to add a jdk tools.jar to the Ant runtime classpath
using
> > the
> > > > Ant
> > > > > > preference pages.
> > > > > >
> > > > > > Are you sure you are starting Eclipse with JDK 1.4.2?
> > > > > > If you start Eclipse using the -vm arg so that Eclipse is
launched
> > > using
> > > > > > your JDK install VM, Eclipse will automatically add the
tools.jar
> to
> > > the
> > > > > Ant
> > > > > > runtime classpath.
> > > > > >
> > > > > > HTH
> > > > > > Darins
> > > > > >
> > > > > >
> > > > > > "ChangWoo Park" <pismute@doit.ajou.ac.kr> wrote in message
> > > > > > news:b9d0k5$chj$1@rogue.oti.com...
> > > > > > > I'm trying to build a project by running Ant from inside
> Eclipse.
> > > All
> > > > I
> > > > > > get
> > > > > > > is the following error-message:
> > > > > > >
> > > > > > > [javac] BUILD FAILED:
file:D:/System/http/build.xml:162:
> > > 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'm using W2K, JDK1.4.2, eclipse2.1
> > > > > > >
> > > > > > > Where to set JAVA_HOME? Nothing works, neither setting the
> > > > > environment-var
> > > > > > > in Eclipse (Preferences - Java - Classpath variables) nor
> setting
> > it
> > > > in
> > > > > > W2K
> > > > > > > Workspace.
> > > > > > >
> > > > > > > Any suggestions?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03146 seconds