jdk 10 的 ext 和 endorsed 文件夹中添加的自定义 jar 的放置位置

Where to place the custom jar added in ext and endorsed folder for jdk 10

在我们的应用程序中,我们在 ext 和 endorsed 文件夹中放置了一些自定义 jar。 jdk 9 之后,这些文件夹被删除,在我们的应用程序迁移到 jdk 10 这些 jar 放在哪里以及如何处理这种情况?

:

The -XX:+CheckEndorsedAndExtDirs options in JDK 8 is useful to detect usages of these mechanisms in preparation for migrating to JDK 9 or newer. The mechanisms were removed in JDK 9 as you have found. The replacement for the extension mechanism is to deploy the JAR file on the class path. The replacement for the endorsed standard override mechanism is the upgrade module path.

我想补充一点,--patch-module 可能也有帮助。