Where to put external jars in jdk10

This is no longer supported, from Migrating to JDK 10 from JDK 8 :

Removed Extension Mechanism

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. Starting in JDK 9, if you need to use the extension classes,
ensure that the JAR files are on the class path.

The javac compiler and java launcher will exit if the java.ext.dirs
system property is set, or if the lib/ext directory exists. To
additionally check the platform-specific systemwide directory, specify
the -XX:+CheckEndorsedAndExtDirs command-line option. This causes the
same exit behavior to occur if the directory exists and isn’t empty.
The extension class loader is retained in JDK 9 (and later releases)
and is specified as the platform class loader (see
getPlatformClassLoader.)

Leave a Comment