Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » eclipse 3.0 build I200311211210 ant compile problem
eclipse 3.0 build I200311211210 ant compile problem [message #119437] Fri, 21 November 2003 23:34 Go to next message
Gerry Reno is currently offline Gerry RenoFriend
Messages: 18
Registered: July 2009
Junior Member
I downloaded integration build (3.0) I200311211210 and I'm trying to ant
compile a project and it is giving me this error:

BUILD FAILED:
file:/home/greno/projects/workspace/jakarta-jetspeed/build/b uild.xml:610:
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

And above it is shown this line:

[echo] java.home = /usr/java/j2sdk1.4.2/jre

This is not my JAVA_HOME. It is set in my environment to
/usr/java/j2sdk1.4.2

This was working properly in my previous eclipse version 2.1.

I don't seem to be able to set java.home anywhere.
Re: eclipse 3.0 build I200311211210 ant compile problem [message #119463 is a reply to message #119437] Fri, 21 November 2003 23:43 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
The JAVA_HOME message comes from the Apache Ant integration. It is not
correct for fixing the problem in Eclipse.
Basically you need to allow Ant to find a compiler.
One way is to ensure that a tools.jar is on your Ant runtime classpath
within Eclipse.
You can add it yourself (Window>Preferences>Ant>Runtime>Classpath) or you
can start Eclipse using the -vm argument to point to your favorite JDK
install and tools.jar will be added for your automatically.

HTH
Darins
BTW This question has been answered many, many times here. Please search at
first http://www.eclipse.org/search/search.cgi. Thanks.

"Gerry Reno" <grenoml@yahoo.com> wrote in message
news:3FBEA11A.8090605@yahoo.com...
> I downloaded integration build (3.0) I200311211210 and I'm trying to ant
> compile a project and it is giving me this error:
>
> BUILD FAILED:
> file:/home/greno/projects/workspace/jakarta-jetspeed/build/b uild.xml:610:
> 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
>
> And above it is shown this line:
>
> [echo] java.home = /usr/java/j2sdk1.4.2/jre
>
> This is not my JAVA_HOME. It is set in my environment to
> /usr/java/j2sdk1.4.2
>
> This was working properly in my previous eclipse version 2.1.
>
> I don't seem to be able to set java.home anywhere.
>
Re: eclipse 3.0 build I200311211210 ant compile problem [message #119476 is a reply to message #119463] Sat, 22 November 2003 00:47 Go to previous messageGo to next message
Gerry Reno is currently offline Gerry RenoFriend
Messages: 18
Registered: July 2009
Junior Member
Darin Swanson wrote:
> The JAVA_HOME message comes from the Apache Ant integration. It is not
> correct for fixing the problem in Eclipse.
> Basically you need to allow Ant to find a compiler.
> One way is to ensure that a tools.jar is on your Ant runtime classpath
> within Eclipse.
> You can add it yourself (Window>Preferences>Ant>Runtime>Classpath) or you
> can start Eclipse using the -vm argument to point to your favorite JDK
> install and tools.jar will be added for your automatically.

Ok, I just tried the -vm /usr/java/j2sdk1.4.2/bin/java arg and eclipse
starts up fine but when I try to run ant again it gives me the exact
same error. I'm going to try setting this manually and see if that works.


>
> HTH
> Darins
> BTW This question has been answered many, many times here. Please search at
> first http://www.eclipse.org/search/search.cgi. Thanks.
>
> "Gerry Reno" <grenoml@yahoo.com> wrote in message
> news:3FBEA11A.8090605@yahoo.com...
>
>>I downloaded integration build (3.0) I200311211210 and I'm trying to ant
>>compile a project and it is giving me this error:
>>
>>BUILD FAILED:
>> file:/home/greno/projects/workspace/jakarta-jetspeed/build/b uild.xml:610:
>>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
>>
>>And above it is shown this line:
>>
>> [echo] java.home = /usr/java/j2sdk1.4.2/jre
>>
>>This is not my JAVA_HOME. It is set in my environment to
>>/usr/java/j2sdk1.4.2
>>
>>This was working properly in my previous eclipse version 2.1.
>>
>>I don't seem to be able to set java.home anywhere.
>>
>
>
>
Re: eclipse 3.0 build I200311211210 ant compile problem [message #119487 is a reply to message #119476] Sat, 22 November 2003 00:59 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
"Gerry Reno" <grenoml@yahoo.com> wrote in message
news:3FBEB21F.6090908@yahoo.com...
> Darin Swanson wrote:
> > The JAVA_HOME message comes from the Apache Ant integration. It is not
> > correct for fixing the problem in Eclipse.
> > Basically you need to allow Ant to find a compiler.
> > One way is to ensure that a tools.jar is on your Ant runtime classpath
> > within Eclipse.
> > You can add it yourself (Window>Preferences>Ant>Runtime>Classpath) or
you
> > can start Eclipse using the -vm argument to point to your favorite JDK
> > install and tools.jar will be added for your automatically.
>
> Ok, I just tried the -vm /usr/java/j2sdk1.4.2/bin/java arg and eclipse
> starts up fine but when I try to run ant again it gives me the exact
> same error. I'm going to try setting this manually and see if that works.
>

Please log a bug report with the reproducible test case...this should work

Thanks
Darins
Re: eclipse 3.0 build I200311211210 ant compile problem [message #119499 is a reply to message #119487] Sat, 22 November 2003 01:38 Go to previous messageGo to next message
Gerry Reno is currently offline Gerry RenoFriend
Messages: 18
Registered: July 2009
Junior Member
Darin Swanson wrote:
> "Gerry Reno" <grenoml@yahoo.com> wrote in message
> news:3FBEB21F.6090908@yahoo.com...
>
>>Darin Swanson wrote:
>>
>>>The JAVA_HOME message comes from the Apache Ant integration. It is not
>>>correct for fixing the problem in Eclipse.
>>>Basically you need to allow Ant to find a compiler.
>>>One way is to ensure that a tools.jar is on your Ant runtime classpath
>>>within Eclipse.
>>>You can add it yourself (Window>Preferences>Ant>Runtime>Classpath) or
>>
> you
>
>>>can start Eclipse using the -vm argument to point to your favorite JDK
>>>install and tools.jar will be added for your automatically.
>>
>>Ok, I just tried the -vm /usr/java/j2sdk1.4.2/bin/java arg and eclipse
>>starts up fine but when I try to run ant again it gives me the exact
>>same error. I'm going to try setting this manually and see if that works.

I set Prefs|Ant|Runtime and put tools.jar on the classpath. Interesting
it had an entry for tools.jar that was D:\j2sdk1.4.0\lib\tools.jar but
I'm on a linux system and I haven't had 1.4.0 for about two years.
Wierd. This was probably why the -vm arg didn't work. Anyway, ant
compiling works now.

Darin - thanks.

Gerry Reno


>>
>
>
> Please log a bug report with the reproducible test case...this should work
>
> Thanks
> Darins
>
>
Re: eclipse 3.0 build I200311211210 ant compile problem [message #119523 is a reply to message #119499] Sat, 22 November 2003 06:21 Go to previous message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
> I set Prefs|Ant|Runtime and put tools.jar on the classpath. Interesting
> it had an entry for tools.jar that was D:\j2sdk1.4.0\lib\tools.jar but
> I'm on a linux system and I haven't had 1.4.0 for about two years.
> Wierd. This was probably why the -vm arg didn't work. Anyway, ant
> compiling works now.
>
> Darin - thanks.
>
> Gerry Reno
>
>

At some time in the past you must have modified the Ant runtime classpath?
This was retained and caused some problems.
Hitting "Restore Defaults" should have cleaned things up as well.
Glad it worked out for you

Darins
Previous Topic:How to open a non-project file
Next Topic:ignore some files during create patch
Goto Forum:
  


Current Time: Sat Nov 02 22:47:38 GMT 2024

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

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

Back to the top