如何替换Java 9中的endorsed目录? [英] How do you replace endorsed directory in Java 9?

查看:94
本文介绍了如何替换Java 9中的endorsed目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Java 8和之前的版本中,存在使用支持目录(java.endorsed.dirs)的机制,该目录是覆盖JDK内部实现的库集合。

In Java 8 and prior there exists the mechanism to use an endorsed directory(java.endorsed.dirs), which is collection of libraries which overrides JDK internal implementations.

我如何在Java 9中解决这个问题。在那里删除了被删除的目录?

How can I solve this in Java 9. As endorsed dirs where removed there?

推荐答案

在JDK 9中,你可以使用可升级模块或放置 JAR类路径上的文件。

In JDK 9, you can use upgradeable modules or put the JAR files on the classpath.

Java 9迁移指南声明:


java.endorsed.dirs 系统属性和 lib / endorsed
目录不再存在如果检测到任何一个, javac 编译器和 java
启动器将退出。

The java.endorsed.dirs system property and the lib/endorsed directory are no longer present. The javac compiler and java launcher will exit if either one is detected.

如果其中任何一个存在,您最终会发现错误:

You would end up finding the error if any of these exists as :


<JAVA_HOME>/lib/endorsed is not supported. Endorsed standards and
standalone APIs in modular form will be supported via the concept of
upgradeable modules. Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.







这些赞同 - 标准覆盖机制被删除以获得模块化运行时图像,现在将使用模块化图像。


These endorsed-standards override mechanism was removed to attain Modular Run-Time Images and would now use the modular image.


模块化图像由模块而不是JAR文件组成。通过模块化形式支持
前进,支持标准和独立API 03#upgradeable-modulesrel =noreferrer>可升级模块

这篇关于如何替换Java 9中的endorsed目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆