[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Ant with a different JVM than Eclipse's JVM. (possible bug in JDTCompilerAdapter
|
- From: gizmoo@xxxxxxxxxxx (Etienne Juliot)
- Date: Tue, 1 Apr 2003 14:33:36 +0000 (UTC)
- Newsgroups: eclipse.tools
- Organization: http://www.eclipse.org
- User-agent: NewsPortal 0.23
Hi,
I have a problem with using JDK 1.4 for Eclipse 2.1 and another JDK (1.3)
for the compilation of my project with ant.
I have try many solutions :
1) Just import my project, and try to "Run Ant". It's fail because it uses
internal preferences for compilation (found in
window->preference->Java->Compiler). And I have more than 1000 warnings in
my project (like "The import java.lang is never used").
This warning are too inside my Java Perspective. Normal. So, I try to
confgiure it.
2) I configure warnings levels to don't warn me for these errors. In Java
Perspective, it's work. Fine.
I try to Run Ant, and I have always warnings.
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.
I try to put inside build.xml :
<condition property="build_compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter">
<isset property="eclipse.running"/>
</condition>
<property name="build.compiler" value="${build_compiler}"/>
And I have always my warnings !!
I think that inside JDTCompilerAdapter, the preference of Eclipse are
forbidden. It seems to be a bug, and perhaps a regression (I don't remeber
this problem with 2.0.2).
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]
But I use JDK 1.3 !! I have put tools.jar, rt.jar in classpath of ant
view, inside CLASSPATH system variable, ...
But eclipse want always to use JDK 1.4 for launching Ant.
I have try to change default JRE (inside windows 2000) for JRE 1.4, but
nothing change.
The only solution is ..... to change PATH order (in Windows) for having
JDK1.3 before JDK1.4.
It's not a good solution, and more than 100 developpers works on my
project, and I can't say to everyone to do this.
When Eclipse launch Ant, Eclipse uses internal PATH ?? Strange ...
5) I try to change preference->java->JRE with Java 1.3.
Nothing change :(
I hope I write enough informations.
Please, help.