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 / July 2006

Tip: Looking for answers? Try searching our database.

Parseable list of API changes in J2SE 1.5

Thread view: 
Lethal Possum - 05 Jul 2006 09:22 GMT
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
Chris Uppal - 05 Jul 2006 10:12 GMT
> 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
Lethal Possum - 05 Jul 2006 13:30 GMT
If I have to make the list myself, I'll look at the tools you
suggested. Thanks.

> > 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
[quoted text clipped - 5 lines]
>
>     -- chris
Thomas Hawtin - 05 Jul 2006 12:34 GMT
> 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
[quoted text clipped - 3 lines]
> 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
Signature

Unemployed English Java programmer
http://jroller.com/page/tackline/

Lethal Possum - 05 Jul 2006 14:08 GMT
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 :

> > 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
[quoted text clipped - 10 lines]
> Unemployed English Java programmer
> http://jroller.com/page/tackline/
EJP - 06 Jul 2006 01:55 GMT
> 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.
Lethal Possum - 06 Jul 2006 11:03 GMT
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 :

> > 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
[quoted text clipped - 5 lines]
> solution which cannot give false positives or negatives. No tool you
> build yourself can be as reliable.


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.