On 13/04/2016 10:26, Aleksey Shipilev wrote:
:
Wait, I confused myself with multiple JDK builds here. This actually
works in JDK 9b113:

Class<?> vmClass = ClassLoader.getSystemClassLoader()
                       .loadClass("com.sun.tools.attach.VirtualMachine");

Therefore, we are fine at the moment. Is this behavior to stay?

The make file you found is the static configuration to map modules to the boot or platform class loaders. All other modules in the runtime image or on the application module path will be defined to the application class loader. In this case the module is named jdk.attach, you can see what it exports with this command:

$ java -listmods:jdk.attach

So no changes for existing code. If you ever get to build JOL as a module then you will express the dependency with `requires jdk.attach`.

-Alan

Reply via email to