This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Upgrading from jdk1.1 to jdk1.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Upgrading from jdk1.1 to jdk1.4" Watch "Upgrading from jdk1.1 to jdk1.4" New topic
Author

Upgrading from jdk1.1 to jdk1.4

Vidyasagar Guduru
Greenhorn

Joined: Apr 17, 2006
Posts: 26
We need to upgrade a non-web java application which is running in JDK1.1.x to JDK1.4

This application uses some of the in-house built utility jar files for common tasks.

We are planning to change the application code according to the new features available from 1.2/1.3/1.4, but not sure how to upgrade the utility jars we are using (those jar files also built using jdk1.1.*). We don't have source code of those jars.

Please let me know the best approach to upgrade those jars, and also if there is any migration guide available to upgrade from 1.1 to 1.4 that would be real great.

Thanks
abhishek pendkay
Ranch Hand

Joined: Jan 01, 2007
Posts: 184
Hi Vidyasagar
my solution may not be the most elegant one nor is it the best one but it does work. Since you do have the JAR file you can surely unzip it and extract the class files. now once you have the class files its not very difficult to generate the source code( softwares for doing that are avaiable on the net) , so now you have the source code for your original JAR files which you can change and then make another JAR with the same name and structure but with the modified source code...
hope this will solve your problem


The significant problems we face cannot be solved by the same level of thinking which created them – Einstein
SCJP 1.5, SCWCD, SCBCD in the making
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39478
    
  28
A simpler answer is . . .


. . . don't.

If the utility files worked under J1.1 is there any need to upgrade them at all?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19726
    
  20

What Campbell Ritchie said.

Java doesn't remove classes, methods or fields. Instead, it marks them as deprecated if they should no longer be used. They still can be used however, so nothing should be broken if you upgrade.

There are exceptions however. Any classes in Sun's private packages (starting with com.sun, sun or sunw) should never be used in any code not belonging to the JDK / JRE itself, because these sometimes can be removed. If the library is written by stupid people that have decided to use these classes, then it may get broken after all.

This is why you should always test everything in an isolated environment. This will ensure that you won't run into any unexpected problems should the libraries break.
[ December 12, 2007: Message edited by: Rob Prime ]

SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42374
    
  64
A simpler answer is . . .

. . . don't.

+1.

You can introduce new language features if at some point you're touching the code anyway for other reasons (say, because you're adding new features). Until then, why change something that works for no pressing reason?


Ping & DNS - my free Android networking tools app
 
Don't get me started about those stupid light bulbs.
 
subject: Upgrading from jdk1.1 to jdk1.4