views:

293

answers:

3

Hi,

I have some enterprise apps running on Java 1.4. They mostly invoke Stored Procedures on a DB, Parse XML files (at the most few megs large), read and write from and 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 don't 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 performance impact?. As in, App compiled on 1.4 and running on 1.6 vs App compiled and running on 1.6. Is 1.6 going to do any bytecode optimization for the same old piece of code compared to 1.4?

Many Thanks js

+1  A: 

It's not the byte code that gets optimized, the byte code format hasn't changed since Java 1(!). The JVM will optimize those parts of the code where runtime analysis tells it that it is worthwhile, but in the JIT-compiled native code. And yes, the step from 4 to 6 should result in better performance - virtual machines have come a long way in those 4.5 years.

Kilian Foth
Thanks Kilian! Yes 4 to 6 jump will def be better in terms of performance. But will the JDK under which the app is compiled also make any difference to the performance (Other than class loading as I think, JDK 6 has got a different way to do it)?
joesatch
+2  A: 

For build compatibility from 1.4 to 1.6 Check for enum variables - it is a new reserved word

Romain Hippeau
Yep, Thanks for that one mate. Had that one already in my mind :).
joesatch
+2  A: 
Steven Mackenzie
Ditto! XML/WS libs are the third party libs i am most worried abt. Guess the best way is to do it and see wht happens. Thanks mate!
joesatch