Still driving off the cliff
Alan Bateman
Alan.Bateman at oracle.com
Mon Feb 27 04:41:24 PST 2012
On 24/02/2012 18:15, Rémi Forax wrote:
> :
> There are lot of program like profilers, debuggers, agents etc
> that relies on the fact that there is a way to separate the platform
> classes from
> the application classes, this is usually done by checking if
> getClassLoader returns null
> on a class.
> If you break this assumption a lot of code will just break.
> So even in a module world, you need a way to separate platform code
> from application code
> (it should be better to even have a system which is able to separate
> the application, from the container,
> from the platform).
>
> I agree with David that we should not have a compatibility mode (at
> runtime).
> Instead of having getClassLoader() returning a module class loader,
> getClassLoader() should still
> return null for the platform class and jigsaw should add a new method
> called getModuleClassLoader()
> that returns the module class loader.
At present then getClassLoader returns null when invoked on classes that
comprise the platform. Invoking the class's getModule().getClassLoader()
method returns the ModuleClassLoader.
Just on agents, there is a lot to do here as there are several APIs
(including JVM TI and java.lang.instrument) that assume the boot and
system class loader. It's also important to be able to deploy agents as
modules.
-Alan
More information about the jigsaw-dev
mailing list