[英]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.我一直在 JDK8 中的 jre/lib/ext 中放置外部 jar 但是,当我将 jdk 更新为 jdk10 时,我在 jdk 目录中找不到 jre 子目录。 So I download jre10 from Oracle and it turns out that the ext directory is missing... where should I put those external jars?
所以我从 Oracle 下载了 jre10,结果发现 ext 目录丢失了……我应该把那些外部 jars 放在哪里?
This is no longer supported, from Migrating to JDK 10 from JDK 8 :这不再受支持,从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.
从 JDK 9 开始,如果您需要使用扩展类,请确保 JAR 文件位于类路径中。
The javac compiler and java launcher will exit if the java.ext.dirs system property is set, or if the lib/ext directory exists.
如果设置了 java.ext.dirs 系统属性,或者 lib/ext 目录存在,则 javac 编译器和 java 启动器将退出。 To additionally check the platform-specific systemwide directory, specify the -XX:+CheckEndorsedAndExtDirs command-line option.
要另外检查特定于平台的系统范围目录,请指定 -XX:+CheckEndorsedAndExtDirs 命令行选项。 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.)
扩展类加载器保留在 JDK 9(及更高版本)中,并被指定为平台类加载器(请参阅 getPlatformClassLoader。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.