简体   繁体   English

在 jdk10 中放置外部 jar 的位置

[英]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.

相关问题 JDK10是否支持AOT编译? - Is AOT compilation supported in JDK10? 三元运算符在 JDK8 和 JDK10 上的行为差异 - Difference in behaviour of the ternary operator on JDK8 and JDK10 无法在Javadoc注释中链接到JDK10 - Can't link to JDK10 in Javadoc comments Intellij IDEA 2018.1 Jdk10 无法运行测试 - Intellij IDEA 2018.1 Jdk10 cannot run test Nashorn在JDK10中的Java.type()异常行为 - Nashorn in JDK10 Java.type() strange behavior Eclipse不支持使用JDK10的动态Web项目 - Eclipse not supporting for dynamic web project using jdk10 从 jdk10 迁移到 jdk11:SSLConnection:CKR_KEY_TYPE_INCONSISTENT - migrating from jdk10 to jdk11 : SSLConnection : CKR_KEY_TYPE_INCONSISTENT 使用JDK10 SDK的IntelliJ无法编译1.8目标的maven项目 - IntelliJ with JDK10 SDK doesn't compile maven project with 1.8 target JDK10:找不到@SpringBootConfiguration,您需要在测试中使用@ContextConfiguration或@SpringBootTest(classes =…) - JDK10: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=…) with your test 如何让 JUnit5 与 JDK10(拼图)和 Maven3 一起工作? - How to get JUnit5 with JDK10 (jigsaw) and Maven3 to work?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM