classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cp-patches] RFC: implementation of getPackage for the vmreference


From: Jeroen Frijters
Subject: RE: [cp-patches] RFC: implementation of getPackage for the vmreference
Date: Sat, 22 Oct 2005 00:16:24 +0200

Nicolas Geoffray wrote:
> That's what I thought too in the first place, but the
> ClassLoader.getPackage calls the parent loader's getPackage
> method. If the parent is null, then it calls 
> VMClassLoader.getPackage().
>
> If VMClassLoader.getPackage had to add the package given as
> parameter, then all packages (system + applications) would be
> defined in VMClassLoader.definedPackages.
> 
> I hope I'm clear enough.
> 
> The suggestion you gave for getPackages (having all bootstrap packages
> in VMClassLoader.definedPackages at startup) could remove the 
> additional VMClassLoader.getVMPackage. Maybe that's a better solution?

> (Sun does it)

Ah, I see what you mean now. In my VM I also have a full list of the
packages defined by the boot class loader, so there my approach does
work (I just tested it). I can't think of any other way to solve this,
there should be a native method that returns a String[] with the native
package names.

Regards,
Jeroen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]