Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java: Where does the Extensions Class Loader get classes from in Java 13?

All the documentation I've been able to find mentions the 'jre/lib/ext' folder but such does not exist on my JRE 13 installation.

I guess somewhere between Java 8 (where I can see the jars in jre/lib/ext) and Java 13, they moved but I've been unable to pinpoint when and how it was done.

Could someone please elaborate what's going on with new JRE's, in terms of where the extension classes reside currently?

like image 668
DraxDomax Avatar asked Mar 03 '23 08:03

DraxDomax


1 Answers

The extension mechanism is gone with Java 9, not only moved [:-| , see the Important Changes and Information for Java 9:

The deprecated Extensions Mechanism has been removed. The runtime will refuse to start if ${java.home}/lib/ext exists or the system property java.ext.dirs is specified on the command line.

And also the Changes to the Installed JDK/JRE Image in JDK 9 Migration Guide:

In previous releases, the extension mechanism made it possible for the runtime environment to find and load extension classes without specifically naming them on the class path. In JDK 9, if you need to use the extension classes, ensure that the JAR files are on the class path.

like image 145
user85421 Avatar answered Apr 27 '23 04:04

user85421