[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Ant with a different JVM than Eclipse's JVM. (possible bug in JDTCompilerAdapter

On Tue, 1 Apr 2003 14:33:36 +0000 (UTC), gizmoo@xxxxxxxxxxx (Etienne
Juliot) wrote:
>3) I try to add "
>-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter" in ant argument,
>like say at http://www.eclipse.org/eclipse/faq/eclipse-faq.html#users_16.
>I have always my warnings.
If you don't want the warnings with ant, in your javac task use
nowarn="on". By default you get the warning. This has nothing to do
with Eclipse. This is the way ant works.

>4) I try to use modern as build.compiler.
>I have this fail :
>..\BusinessApplication.java:41: cannot access java.lang.Object
>       [javac] bad class file: C:\Program
>Files\Java\j2re1.4.1\lib\rt.jar(java/lang/Object.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.
>       [javac] 
You use 1.4.1 .class file on a 1.3 VM. This is not supposed to work.
Ant is using the same VM than the one you use to run Eclipse.

>When Eclipse launch Ant, Eclipse uses internal PATH ?? Strange ...
As far as I know, ant is using the same VM than the Eclipse one. So if
you run Eclipse on a 1.4 VM, ant runs on a 1.4 VM.

In this case, you might want to set the target option of your javac
task.

HTH,
--
Olivier