Hi,
I'm wondering, is there a command (ex. javadiffapi version 1 2) to show
the difference of a class/method api between version 1 and 2?
---
Thanks
John
Toronto
Oliver Wong - 28 Jun 2006 15:42 GMT
> Hi,
>
> I'm wondering, is there a command (ex. javadiffapi version 1 2) to show
> the difference of a class/method api between version 1 and 2?
You could download the javadocs for each version, and run a UNIX diff on
the relevant files. For Sun's standard API, they tend to only add new API,
or deprecate old API. They *usually* don't change existing API, nor do they
completely remove old API.
- Oliver
andrewthommo@gmail.com - 28 Jun 2006 16:22 GMT
...
> I'm wondering, is there a command (ex. javadiffapi version 1 2) to show
> the difference of a class/method api between version 1 and 2?
Theoretically, the /current/ JavaDocs should tell you the differences
through use of the @since tag in the source, but that information
is patch.
For example..
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JSpinner.html
..reports that JSpinner is 'since 1.4', but beware!
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Color.html#WHITE
(Color.WHITE, as opposed to Color.white) also introduced in 1.4,
but /not/ documented. ..I also quickly checked the javax.swing
package summary and another swing class to see that neither
had an @since tag. Uggghhh!
OTOH, all is not lost, if you can obtain a JRE of the variety
you are interested in, you can find out quite definitely if it
has a particular class, field of method - by compiling
Java source using it as the -bootclasspath.
HTH
Andrew T.