• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java 1.4 to Java 6 migration

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
JavaMonitor Support
Posts: 251
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Joe Satch
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 251
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sabarishreddy ozili,
Your post was moved to a new topic.
reply
    Bookmark Topic Watch Topic
  • New Topic