太阳发生了什么事。*包裹 [英] what happened to sun.* packages

查看:112
本文介绍了太阳发生了什么事。*包裹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在JDK 7文档中找不到关于 sun。* 包的任何引用。
是否已弃用。但那么替代品是什么?

I don't find any references in JDK 7 documentation regarding sun.* packages. Is it deprecated. But then what are the substitutes?

例如: sun.reflect。*; 已被弃用,那么什么是现在的选择?

For eg: sun.reflect.*; is deprecated, so what are the options now?

如果有人可以发布已弃用的软件包和新的可用选项,那就太棒了。

It would be great if someone could post the deprecated packages and the new options available.

注意:我通过将访问规则设置为所有可用来成功使用它们。

Note: I succeded in using them by setting access rules to all available.

什么这是什么意思?

推荐答案

不推荐使用 sun.reflect 包。它们仅供JDK内部使用。 Oracle(以前称Sun)不记录内部包,也不保证它们将存在于所有Java平台实现中(任何供应商都可以实现Java平台),也不保证它们在所有版本的标准Oracle Java平台中都是相同的实施。

The sun.reflect packages are not deprecated. They are for internal use by the JDK only. Oracle (formerly Sun) does not document the internal packages and does not guarantee that they will exist on all Java platform implementations (any vendor can make a Java platform implementation) nor that they will be the same in all versions of the standard Oracle Java platform implementation.

Oracle在他们的网站上解释了这一点


sun。* 包不是受支持的公共界面的一部分。

The sun.* packages are not part of the supported, public interface.

直接调用 sun的Java程序。 * 包不是
保证可以在所有兼容Java的平台上运行。事实上,即使在同一个
平台的未来版本中,这样的
计划也不能保证工作。

A Java program that directly calls into sun.* packages is not guaranteed to work on all Java-compatible platforms. In fact, such a program is not guaranteed to work even in future versions on the same platform.

这篇关于太阳发生了什么事。*包裹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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