Parseable list of API changes in J2SE 1.5

L

Lethal Possum

Hi everyone,

Well the title almost says it all: I'm looking for a list of the API
addition in Java 1.5 (new classes, methods, etc...). The official
reference seems to be Java release notes but the web page in not easily
parseable:

http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html

I need a parseable list to build a tool that monitors my company's
source code repository and detects when someone uses API elements from
1.5 that may not available to our clients using 1.4. I tried for
example to compile with the -target 1.4 or -source 1.4 options and
these do not check for API differences. I know I could simply use the
actual JDK 1.4 and see if compilation errors occur but they may be
caused by other problems and it's not a very elegant solution anyway.

Cheers,

LP
 
C

Chris Uppal

Lethal said:
I need a parseable list to build a tool that monitors my company's
source code repository and detects when someone uses API elements from
1.5 that may not available to our clients using 1.4.

One approach would be to scan the 1.4 and 1.5 versons of rt.jar using something
like ASM or BCEL to build lists of the published members of the published
classes. Then diff 'em.

-- chris
 
T

Thomas Hawtin

Lethal said:
I need a parseable list to build a tool that monitors my company's
source code repository and detects when someone uses API elements from
1.5 that may not available to our clients using 1.4. I tried for
example to compile with the -target 1.4 or -source 1.4 options and
these do not check for API differences. I know I could simply use the
actual JDK 1.4 and see if compilation errors occur but they may be
caused by other problems and it's not a very elegant solution anyway.

You need to use -Xbootclasspath in addition to -source and -target.

Tom Hawtin
 
L

Lethal Possum

If I have to make the list myself, I'll look at the tools you
suggested. Thanks.
 
L

Lethal Possum

I didn't know the bootclasspath option. Using it to compile the
application with Java 1.4 rt.jar is certainly the easiest solution to
my problem. But the reason I was thinking of creating my own tool is
that compiling the application takes quite some time and I would like
to find a faster solution.

Thanks.

Thomas Hawtin a écrit :
 
E

EJP

Lethal said:
I didn't know the bootclasspath option. Using it to compile the
application with Java 1.4 rt.jar is certainly the easiest solution to
my problem. But the reason I was thinking of creating my own tool is
that compiling the application takes quite some time and I would like
to find a faster solution.

It may be a faster solution but compiling with 1.4 is a *correct*
solution which cannot give false positives or negatives. No tool you
build yourself can be as reliable.
 
L

Lethal Possum

I agree with you that it is more reliable. I think I'll compile first
with 1.5 to find syntax errors and others. If none, then I'll compile
with 1.4 to check for 1.5 dependencies.

Thank you all for your help.

Cheers,

LP

EJP a écrit :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,182
Latest member
BettinaPol

Latest Threads

Top