简体   繁体   中英

Why can't I find the API documentation for com.sun.* classes in rt.jar?

I found a scenario that uses com.sun.jndi.toolkit.UrlUtil class in a source cods. I can find this class in rt.jar in Standard Java Distribution. But I cannot find any API documentation for classes in this package. Why these classes are hidden? Are there any drawbacks in using those classes in my code?

Because com.sun.* is not an API. It's Sun's implementation. You shouldn't rely on these classes, because they are likely to change.

Altavista found this one

http://www.docjar.com/docs/api/sun/misc/package-index.html

It's not official, but may help...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM