The cost of installing a new JDK
Are you planning to install the new JDK 1.5 or have you already installed it? Think its all over? Just to avoid future confusion and blues continue reading...
The community seems to be excited with the new Java 1.5/5.0 release and there are varied thoughts about its enhancements and performance benchmarks. While installing a non-beta version of any JDK is very good choice and recommendation, things are not as rosy as they seem.
XJB takes a look at the hidden cost* of installing the new JDK.
1. Uninstall the old JDK: Any time you install the new JDK, the older one needs to be removed/uninstalled explicitly (sometimes manuall also, in case the base directory could not be deleted properly). Although you may feel the new JDK is now up and running, you will never wish to waste those extra MBs for something that is of no use now.
2. Web/App Servers: Alright. Do you have any web/app server installed in your machine prior to installing the new JDK? I am sorry to say that it is most likely that it may no longer start or worse yet, malfunctions. Stop laughing! thats not a serious joke. If you are using Tomcat for example, you need to change the environment variables and classpaths properly. Although most of the time they point to the right location, it may not do so with all the versions of your web/app server.
3. Your pretty lovely IDE: Sorry, but if you are using an IDE and selected the JDK installation directory when you installed it, it may no longer work. Please dont panic if it does not start of gives you troubles. Thats natural. Worse yet, if your IDE doesnt have any option to configure the JRE/JDK it is using you need to install your love again.
4. Java based Installables: Many java based installables, I mean, the installable files created by some tools like InstallAnywhere or similar, may not be able to serve you anymore. And yes, there is no way out for this issue, or atleast, I do not know one.
*This fact is based on my personal experience when I created an installer for JACK with InstallAnywhere that was working fine with JDK 1.3 but the same failed with JDK 1.4.
5. Other Installed Programs: Most of the time you will be able to find out programs that depend on Java and you may try to reinstall/re-configure them to make the necessary changes. But many a time you may not be able to understand why things are malfunctioning. Try out your J2ME wireless toolkit if you have installed one. After the new JRE/JDK takes over, the J2ME toolkit goes banana and do not tell you whats wrong with it. Try it!
How to make sure the new installation doesnt hinder with your present environment?
Well, pretty difficult in case things are strongly bound with the present environment of JDK but you should indentify the key and frequently used products/installs that are dependent on your present JVM and take necessary backups of the project/environment settings associated with the JVM.
I hope the list here is extensive enough to consider the after shocks. Well, the intention here is not to discourage you from updating your new JDK but to prevent future troubles arising out of your decesion to install one.
After all, prevention is always better than cure :)
*please note that the cost here doesnt mean monetary cost.
[Resource-Type: Tips; Category: Java/JDK/Installation; XRating: 5 ;-) ]








7 Comments:
Where on Earth did you get the idea that you must uninstall older versions of the J2SDK? That's nonsense.
Your bullet points 2-5 all depend on 1, so the whole post is bogus fearmongering.
jdf@pobox.com
http://MrFeinberg.com/
8:18 PM
These issues seem to be quite practical. I am not sure if Fein is right? Lets wait for comments from other people.
3:10 AM
I have JDK1.4.2, JDK1.5 BETA, JDK1.5 all installed in my machine. I have my tomact running with 1.4.2, One Project in eclipse using 1.5 and other projects using 1.4.2. So far everything is nice for me. I am using Windows XP. You should try it. Did you get any error while having both 1.4 and 1.5 in the same machine.
10:58 AM
Right.
If you are fine with 4 versions of JDK in your machine and do not wish the latest one to work for your pre installed applications then the cost of installing the new JDK is nothing. But... then the question is, have you really installed new Java?
I attended one of the Sun Developer conferences and got to know that every new version (may be x.x.1 from x.x) has many enhancements especially the garbage collection and much more. And in case of 1.5 esp. you have very nice architecture where in all your applications run on the same JVM, i.e. you do not have a new copy of JRE for each of your application. Also, in case you are using IDEs based on Swing, you can just clearly see what the new installation has done to the UI. It gives you tremendous benefits over the old one.
So, once again, (logically), there is no much benefit(apart from some more APIs for development and your future installations) that the new JDK is fetching you.
12:15 PM
I think this is a result of not reading the docs properly and not understanding the difference between the JDK and the JRE.
It's perfectly feasible to install multiple JDKs on one machine, as other commenters have said. Everybody I know who develops Java code has at least two, more usually 1.2, 1.3, 1.4, and 1.5.
It's also easy to install multiple versions of app servers and libraries. It all comes down to managing the classpath of various projects.
If you don't want to change the version of Java used by installed apps, don't install the JRE when you install a JDK.
2:23 PM
There are legit reasons to install more than one JDK version on the same machine. For example, at my job I'm maintaining a third party server-based java application, which is certified on JDK 1.4.2_04-b05. However, I'm also getting up to speed on JDK 1.5.x and developing prototype apps with it. So I need and have both JDKs.
12:24 AM
Hi,
I have to run to application on my machine.
One is written in jdk1.5,
While the other one is written in jdk1.3.
What all path,classpath settings i need to do so that i can do build(using ant on DOS promt)for both t he projects.
Thanks
6:47 PM
Post a Comment
<< Home