OpenJDK和com.sun.net [英] OpenJDK and com.sun.net

查看:53
本文介绍了OpenJDK和com.sun.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究在com.sun.net软件包中使用HttpsConfigurator,HttpsServer和HttpContext.另外,我的项目要求的一部分是使用OpenJDK.

I am looking at using HttpsConfigurator, HttpsServer, and HttpContext in the com.sun.net package. Additionally, part of my project requirement is to use OpenJDK.

我正在Eclipse中进行编码,因为它被视为禁止",因此它不会自动从com.sun.net软件包中导入任何内容.启用禁止的软件包后,我可以使一切正常工作,构建和运行.我的问题是,什么可以在OpenJDK中安全使用?我的印象是它只是java.*和javax.*包.

I am coding in Eclipse, which will not auto import anything from the com.sun.net package, because it is considered 'forbidden'. After enabling forbidden packages, I can get everything working, building and running. My question, what is considered safe to use in OpenJDK? I am under the impression that it is just the java.* and javax.* packages.

我下载了OpenJDK 7源,并且看到com.sun.net是源的一部分,这意味着我的假设可能不正确.我还没有进行过任何谷歌搜索,我希望这里的一位专家可以填写缺失的部分.

I downloaded the OpenJDK 7 source, and I see that com.sun.net is part of the source, which implies that my assumption might be incorrect. I haven't had any luck googling yet, and I was hoping one the experts here can fill in the missing pieces.

回顾一下,什么可以在OpenJDK中安全使用?为什么Eclipse会将com.sun.net标记为禁止"?

In recap, what is considered safe to use in OpenJDK? Why would Eclipse label com.sun.net as 'forbidden'?

谢谢!

推荐答案

无数文档-书籍,文章,教程,官方JDK文档-都解释说com.sun.*软件包是实现细节,可能会更改或更改.随时移走;它们不适用于用户程序.它们不具有可移植性,不能可靠显示,并且可能不如实际的API类强健.通常,如果JDK文档包中包含Javadoc,则供您使用.否则不会.

Countless documents -- books, articles, tutorials, official JDK documentation -- have explained that the com.sun.* packages are implementation details, subject to change or removal at any time; they are not intended for user programs. They are not portable, not reliably present, and possibly not as robust as actual API classes. In general, if the JDK documentation bundle contains Javadoc for it, it's intended for your use; otherwise not.

这篇关于OpenJDK和com.sun.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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