[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 JDTCompilerAda

OK, so 2 things :

1) Why, when I choice JDK 1.3 in Java Plugin in configuration panel of
Windows (which mean that every java program will be launch with JRE 1.3),
ant is launch with JDK 1.3 ? And why when I change the PATH order, it's
work ?


2) I search inside the source code itself of Eclipse project. And I think
I found a bug for JDTCompilerAdapter.
See at :
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java?rev=1.20&content-type=text/vnd.viewcvs-markup

I can see :


	/*
		 * Handle the nowarn option. If none, then we generate all warnings.
		 */		
        if (attributes.getNowarn()) {
			if (deprecation) {
				cmd.createArgument().setValue("-warn:allDeprecation"); //$NON-NLS-1$
			} else {
	            cmd.createArgument().setValue("-nowarn"); //$NON-NLS-1$
			}
        } else {
			/*
			 * deprecation option.
			 */		
			if (deprecation) {
				cmd.createArgument().setValue(
					"-warn:allDeprecation,constructorName,packageDefaultMethod,maskedCatchBlocks,unusedImports,staticReceiver");
//$NON-NLS-1$
			} else {
				cmd.createArgument().setValue(
					"-warn:constructorName,packageDefaultMethod,maskedCatchBlocks,unusedImports,staticReceiver");
//$NON-NLS-1$
			}
        }



As everybody can see, when getNoWarn is false, every warning level are
write INSIDE the code (hard coding).
It doesn't use user's preferences.

Can I open a new bug in your bugzilla ?

Darin Swanson wrote:

> Ant within Eclipse is run within the same VM that you launch Eclipse with.
> Setting the JRE preference within Eclipse will have no impact on the JRE
> used for your javac.
> See http://bugs.eclipse.org/bugs/show_bug.cgi?id=24129

> HTH
> Darins