At 11:39 AM 6/17/99 +0200, you wrote:
>Hello,
>
>I use JDE 2.1.6beta2 with NT Emacs 20.3.10 on Windows NT4 SP4 and It seems
>that the import wizard (that is the jde-wiz-find-and-import command)
>cannot find the core Java classes when using JDK 1.2.
>The jde.wizards.ImportWizard class gets the current user classpath setting
>from the "java.class.path" system property. In JDK 1.2 the core Java
>classes no longer are in classpath but in bootclasspath instead.
>I have made changes to the jde.wizards.ImportWizard class to search for
>core Java classes in JDK 1.2 using the new "sun.boot.class.path" system
>property.
>It seems that the import wizard returns as many occurences of a class found
>as the same path occurs in classpath. I have fixed that too.
>
Thanks for the fix, David. I have been simply including rt.jar in my
jde-global-classpath
but your patch is much more elegant and consistent with the JDK 1.2
model of not having to include core classes explicitly.
I will incorporate you path in the upcoming JDE 2.1.6beta3 patch, which
will also
include context-sensitive help for Java classes. I expect to have the beta3
available
by the weekend, if not before.
- Paul
>Here is my patch. The import wizard works great now for me with Java 2.
>
>56a57,62
>>
>> // For Java 2!
>> String classPath2 = System.getProperty("sun.boot.class.path");
>> if (classPath2 != null)
>> classPath += classPathSeparator + classPath2;
>> 167c173,176
>< importList += " \"" + testName + "\"";
>---
>> // Avoid duplicates!
>> testName = " \"" + testName + "\"";
>> if (importList.indexOf(testName) == -1)
>> importList += testName;
>
> I hope this will help.
>
>Sincerely.
>
>David
>