Re: Compiler incompatibility?
- From: "Rhino" <no.offline.contact.please@xxxxxxxxxx>
- Date: Sat, 29 Apr 2006 18:13:41 -0400
"Jean-Francois Briere" <jfbriere@xxxxxxxxx> wrote in message
news:1146337153.638303.61540@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The ANT javac task uses the JDK compiler. You must use a 1.4 version ofYes, I have a tools.jar, specifically D:\Java\jdk1.5.0_06\lib\tools.jar.
the JDK I guess.
The Eclipse project in the other hand uses the Eclipse compiler, which
must be set to 5.0 compliance level I guess.
Every time you save a .java file in your project it automatically
rebuild with the Eclipse compiler.
But when you start the execution of the ANT script in your project or
from the command line you use the JDK compiler and it can lead to
dependent .class files mismatch.
Two questions to be answered first:
1- In Eclipse:
In the window, left side: expand 'Ant' then click on 'Runtime'From the menu: 'Window' / 'Preferences...'
On the right side: expand 'Global Entries'
*** What do you see? Do you have a tools.jar in it? Does it come from a
JDK 1.4? Else? ***
2- In Eclipse:
select 'Properties'From the Package Explorer window: right-click on your project then
In the window, left side: click on 'Java Compiler'
*** On the right side, what is the compiler compliance level? ***
All of the JDK Compliance section is greyed out ("Enable project specific
settings" is NOT checked). However, but the compiler compliance level is
clearly 5.0. By the same token, in Windows/Preferences/Java/Compiler,
Compiler Compliance level is 5.0 and "use default compliance settings" is
checked.
Also, the value of the compiler parameter in my Ant javac task is "modern".
--
Rhino
.
- Follow-Ups:
- Re: Compiler incompatibility?
- From: Rhino
- Re: Compiler incompatibility?
- References:
- Compiler incompatibility?
- From: Rhino
- Re: Compiler incompatibility?
- From: Jean-Francois Briere
- Compiler incompatibility?
- Prev by Date: Re: TableSorter.java v2.1
- Next by Date: Re: TableSorter.java v2.1
- Previous by thread: Re: Compiler incompatibility?
- Next by thread: Re: Compiler incompatibility?
- Index(es):
Relevant Pages
|