Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2005

Tip: Looking for answers? Try searching our database.

Javadocs for tools.jar stuff

Thread view: 
Ryan - 23 Apr 2005 20:22 GMT
Does anyone know where I can find javadocs for the classes defined in
tools.jar of (most) JDKs?  Googling hasn't worked for me.

Also, I've heard on a couple of ocassions people complaining about the
classes in the com.sun.* packages.  Any specific examples of problems?

Thanks,

Ryan
Ross Bamford - 24 Apr 2005 03:07 GMT
> Does anyone know where I can find javadocs for the classes defined in
> tools.jar of (most) JDKs?  Googling hasn't worked for me.
[quoted text clipped - 5 lines]
>
> Ryan

These classes are 'internal' and undocumented. I believe the same goes
for tools.jar (platform specific tools?), but memory fails me at
03:03 :).

Sun's official stance on them is "Don't use them", or "Go ahead and use
them, but don't ask for documentation, don't complain when they change
(or even disappear), and don't expect your code to be portable".

The whole com.sun hierarchy basically does the work in the (Sun) JVM.
The standard java.* / javax.* are largely 'Facade' classes, which have
simple methods that just call out to the com.sun methods.

You often see in the full stack trace how the facade works. Also try
toString() on a few classes you get from java.* class factories and the
like.

-= Ross =-

Signature

   [Ross A. Bamford]      [ross@roscopec0.f9.co.uk]
Roscopeco Open Tech ++ Open Source + Java + Apache + CMF
http://www.roscopec0.f9.co.uk/ + info@roscopec0.f9.co.uk

Thomas Weidenfeller - 25 Apr 2005 10:04 GMT
> Does anyone know where I can find javadocs for the classes defined in
> tools.jar of (most) JDKs?

They are only documented on some high level. tools.jar contains the
implementations of the various tools that come with the JDK, like javap,
javadoc, javac, jarsigner, jdb, etc.

The JDK contains documentation for these applications, but not for the
individual classes.

> Also, I've heard on a couple of ocassions people complaining about the
> classes in the com.sun.* packages.  Any specific examples of problems?

It is risky to use them, because Sun can change them any time, and does
so. Other VM implementations are likely to not have all these Sun
classes at all.

Some very few such classes have sneaked into the rank of public or
semi-public APIs. E.g. the compiler invocation, and AFAIR the JPEG image
decoder in some early toolkits.

The internal ftp class was also popular at some point in time. But that
one AFAIK never made it into a semi-public API.

In general, unless you find a strong statement from Sun that it is ok to
use such a class, stay away from them.

/Thomas

Signature

The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.