aspose file tools*
The moose likes Performance and the fly likes Java 1.4 to Java 6 migration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Java 1.4 to Java 6 migration" Watch "Java 1.4 to Java 6 migration" New topic
Author

Java 1.4 to Java 6 migration

Joe Satch
Greenhorn

Joined: Jan 29, 2009
Posts: 2
Hi,

I have some enterprise apps running on Java 1.4. They mostly invoke Stored Proces on DB, Parse XML files (Not too large files, at the most few megs), read/write from/to disk. We have a requirement where now we have to migrate these apps to Java 6(No code changes to be done at all). My questions:

- If I dont recompile my apps under Java 6 and just run them with it, will it work fine (I know they 'should'). But if somebody thinks other way round, could you kindly share your thoughts please?
- More important question is - Will it have any perfomance impact?. As in, App compiled on 1.4 and running on 1.6 vs App compiled and running on 1.6. Is 1.6 gonna do any bytecode optimization for the same old peace of code compared to 1.4?


Many Thanks
js
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 861
I have done what you are trying to do ( Run 1.4 compiled code in 1.6). I found that it ran with no problems and was faster than the same code run in 1.4, but I don't know if that is a universal truth.


http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
Kees Jan Koster
JavaMonitor Support
Rancher

Joined: Mar 31, 2009
Posts: 251
    
    5
Dear JS,

No code changes are a requirement? Well, hopefully you get time later to start using the type safe collections and the java.util.concurrent classes, see http://java.sun.com/javase/6/docs/api/java/util/concurrent/package-summary.html

Java 1.6 is miles faster than the 1.4 JVM. For CPU-bound processes you should see 50% reduction in processing time. Make sure you are using the -server command line option, see http://java-monitor.com/forum/showthread.php?t=552 Java 1.6 introduces a lot of lock optimisations that should help you on multi core machines, see http://java-monitor.com/forum/showthread.php?t=133

In my experience XML processing changed so much between 1.4 and 1.6 that I would pay special attention to anything that deals with XML when testing the migrated application.

Kees Jan


Java-monitor, JVM monitoring made easy <- right here on Java Ranch
Joe Satch
Greenhorn

Joined: Jan 29, 2009
Posts: 2
Hey Guys,

Thanks for the reply!

@steve - Yes, running on 1.6 will def be faster. But will compilation on 1.4 or 1.6 make any difference?

@Kees - Yes, no code change is a kind of requirement (Sad but true!). Didnt know that for CPU bound processes might get perfromnace benefits to the order of 50%. Thanks for sharing that. Also, XML libraries are the ones I am really worried abt. I just think that over last few years, XML processing and transofrmation has become too messy. But I get your point.

Cheers
js
Kees Jan Koster
JavaMonitor Support
Rancher

Joined: Mar 31, 2009
Posts: 251
    
    5
Dear Joe,

Whoever set the "no code changes" requirement needs to be sacked. Java 1.5 is EOSL, let alone 1.4. You are *years* behind in code cleaning and starting to use the safer and more performant collections (to name one example). The person setting the requirement is just adding to the technological debt you guys are building up.

Kees Jan
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11500
    
  16

sabarishreddy ozili,
Your post was moved to a new topic.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java 1.4 to Java 6 migration