I conducted some testing to try to run Java 9 modular JRE on OSv 
(java.base) and it requires changing java.cc to make runjava.jar get loaded 
by system classloader instead of extension classloader. It turns out that 
was extension classloader is removed from Java 9 (more specifically Java 9 
will not start if lib/ext is present). 

Does anybody remember what was the reason to load runjava.jar by extension 
classloader instead of explicitly setting java.class.path to the path of 
the jar and thus loading using the system loader? If I understand runjava 
classloading related logic in the "isolated JVM" mode it uses special 
OsvSystemClassLoader which then ends up creating child AppClassLoader for 
each app. I think it would work if runjava.jar was loaded by regular system 
classloader instead of the extension one. I could test that but I wonder if 
there were some gotchas with apps  running in Tomcat or other J2E app 
servers.

Another observation is that MultiJarLoader or "isolated JVM" mode will only 
work if Java 9 JRE image (created by jlink) contains java.beans module 
(same applies to Java 8 compact profiles).

Modular JRE - http://openjdk.java.net/jeps/220 (look for Removed: The 
extension mechanism)
*jlink - http://openjdk.java.net/jeps/282*
*http://openjdk.java.net/jeps/200*


 

  

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to