• 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

Upgrade from Java 1.3

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone

I have recently started a new job and inherited a java project that still runs on Java 1.3.

My boss wants me to upgrade the jvm on the production system. Since I have little expereience with java system management (I come from a development background) I would appreciate any input on this subject.

What would the pros and cons be of upgrading the JVM on the production machine? Would there be a performance gain? Would I need to recompile the code, or can newer JVM's interprid old .class files?

Any general pointers and tips would be much appreciated.

Production system:
Solaris 8
java version "1.3.1_20"
Tomcat

Thank you,
Heinrich
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Heinrich and welcome to Javaranch!

You'll probably get several opinions on this, but a couple of points to start with:

1.) The current version of Java you are using has reached its EOL and is no longer supported, so yes it's probably worth moving (you've got potential security holes as well).

2.) You can upgrade the JVM (currently supported versions are 1.5.0_x and 1.6.0_x), 1.4.x is also EOL, so don't go there.

3.) Have you got access to the source code? You'll almost certain want to recompile it with a newer version of the JDK (e.g. the same version as the JVM), this will help pick up versioning issues early on/reduce the risk of them.

4.) You'll probably find that your Tomcat may run strangely on a newer JVM (what version of Tomcat are you using?).

5.) You'll also probably find that you may need Solaris kernel patches in order to make the newer JVMs run.

6.) You will need to be careful how you configure the Java home directory and how your various system and user processes may want to interact with that (e.g. It's not uncommon to have several versions of the JVM running on a single box as different apps need different versions).

Hope that helps a little!
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Heinrich Filter:
Any general pointers and tips would be much appreciated.



Set up a test system that matches your production system and do lots and lots of testing.
Once you've completed that do lots more testing

Don't go anywhere near your production system until you have completed this step.
 
Heinrich Filter
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Martijn Thanks allot for so much useful information!

I quickly tried to find the Tomcat version number, but could not locate it. After a quick google on the subject I found that newer Tomcat versions have a "version.sh" script that returns the appropriate information. Obviously my version pre-dates this. Do you know how I can find the version number on older Tomcat installations?

Would you recommend that the whole stack (OS, jvm, tomcat and own source code) be upgraded at the same time or would there be a step-by-step upgrade path available?

Thanks again for your time and quick response!

Regards,
Heinrich
 
Heinrich Filter
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Joanne thanks for the tip .

Would a virtual machine replica suffice for testing or are there some hardware specific things that might go wrong?
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Heinrich Filter:
@Joanne thanks for the tip .

Would a virtual machine replica suffice for testing or are there some hardware specific things that might go wrong?



Ideally you should use identical hardware/os, etc as this will reduce the possibility of any problems being hardware/os, etc related. Obviously this isn't always possible but you should aim for as near as possible, in order to make narrowing down the cause of any problem you come across easier.
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with Joanne, especially in this case because you are dealing with Solaris (which is nasty when it comes to Java and having to patch its kernel just to get Java to work). As Solaris 8 boxes that mimic your prod environment might be hard to come by (although ebay etc is a good place to get cheap boxes) you may have to test in a virtual machine but make _everyone_ aware of the inevitable risk when you update prod.

In terms of the version of Tomcat, I found some message forums discussing how you detect older versions by googling "How do I know what version of Tomcat I am running?"
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note that a new JVM will be able to run the old class files, so in principle you wouldn't need to recompile the code. However, as Martijn already said, it's better to recompile with the JDK that matches the runtime environment. You might catch some problems early, and maybe you'll benefit from optimizations in the newer compiler that will make your code run faster.

Even if you don't recompile, you'll certainly have a performance benefit when running the code on Java 5 or 6. The JVM gets faster and more efficient with every release, and in some areas the performance gain is very significant from one JVM version to the next. See, for example, this whitepaper, which shows that Java 6 is in some areas 200% as fast as Java 5.
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Isn't the one thing which might cause problems boxing or unboxing?
reply
    Bookmark Topic Watch Topic
  • New Topic