Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
570 views
in Technique[技术] by (71.8m points)

java - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...