Java:Extensions Class Loader在Java 13中从哪里获取类? [英] Java: Where does the Extensions Class Loader get classes from in Java 13?

查看:91
本文介绍了Java:Extensions Class Loader在Java 13中从哪里获取类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够找到的所有文档都提到了'jre/lib/ext'文件夹,但是在我的JRE 13安装中不存在.

All the documentation I've been able to find mentions the 'jre/lib/ext' folder but such does not exist on my JRE 13 installation.

我猜在Java 8(可以在jre/lib/ext中看到jar)和Java 13之间的某个地方,它们移动了,但是我无法查明它的完成时间和完成方式.

I guess somewhere between Java 8 (where I can see the jars in jre/lib/ext) and Java 13, they moved but I've been unable to pinpoint when and how it was done.

有人可以根据扩展类当前所在的位置来详细说明新JRE的情况吗?

Could someone please elaborate what's going on with new JRE's, in terms of where the extension classes reside currently?

推荐答案

Java 9扩展机制已不复存在,不仅移动了[:-| ,请参见 Java的重要更改和信息 9:

The extension mechanism is gone with Java 9, not only moved [:-| , see the Important Changes and Information for Java 9:

已弃用的扩展机制已删除.如果存在${java.home}/lib/ext或在命令行上指定了系统属性java.ext.dirs,则运行时将拒绝启动.

The deprecated Extensions Mechanism has been removed. The runtime will refuse to start if ${java.home}/lib/ext exists or the system property java.ext.dirs is specified on the command line.

还有更改到

在以前的版本中,扩展机制使运行时环境可以查找和加载扩展类,而无需在类路径上专门命名它们.在JDK 9中,如果需要使用扩展类,请确保JAR文件位于类路径上.

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. In JDK 9, if you need to use the extension classes, ensure that the JAR files are on the class path.

这篇关于Java:Extensions Class Loader在Java 13中从哪里获取类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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