tags:

views:

67

answers:

2

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?

+6  A: 

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.

Bozho
+1 - the public interface to them, that is the methods with a well-defined locked-down implementation that you can call with confidence **is** documented; it's the empty set. Your code should not even *know* (explicitly) about the existence of these classes, and casting references to them should be setting off warning bells rather than requests for documentation. ;-)
Andrzej Doyle
A: 

Altavista found this one

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

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

Carlos Heuberger