简体   繁体   中英

Where to put external jars in jdk10

I've been putting external jars in jre/lib/ext in JDK8 However ,when i update my jdk to jdk10,i cannot find jre sub-directory in jdk directory. So I download jre10 from Oracle and it turns out that the ext directory is missing... where should I put those external jars?

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.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM