Monday, May 24, 2010

JDK 1.6 installation problems

Today's topic is Java Developers' Kit.

I've had a peculiar problem with JDKs.  I wanted to install the latest version of JDK 1.6 update 18 at the time, but I also wanted to have JDK 1.5 so that I test my application with different compilers and runtime environments.

However there was some sort of problem with it (the source of it, I am unaware till this day) that caused my Windows  unable to detect my successful installation. I checked that on this special site java.com

I could also check it with an applet in a page - it said that I need to install java...

1. First idea - reinstall
I thought that my register was messed-up and ran CCleaner to clean it. That didn't help.

I decided to reinstall it and here's my first surprise:
After the successful uninstall and running CCleaner again (just to be sure), and decided to reinstall the JDK
I've got a very "funny" error message (something like this - I don't remember the correct caption):

"Installer has detected that you have JDK installed. Do you want to repair/reinstall it?"
If you click NO - the installer shuts down.
If you click YES - the following message appears:

"You don't have JDK installed on your machine!"

Holly shit ! Isn't that just a bit contradicting...

Obviously, the algorithm at the beginning isn't the same as the one at the end...

2. Second idea - install older version
OK. I cannot override this incorrect installation. So let's try to downgrade it a bit.
I decided to try JDK 1.6 update 17. When I run it it said:

"You have already installed a higher version of JDK" - installation finished!

Thank you very much, smart installer!

3. Third idea - ask Google
"OK stop trying to be a smart ass. There has to be somebody with the same problem that has a solution!" 
 was my thought.
Yeah, right... After many hours of searching and "smart solutions", none of them helped me.
I intend not to list them here... just too many and very customized...

One of them seemed promising to me.
Google helped me find a tool and step-by-step solution.

4. Forth idea - clean up registry 
I absolutely had no other choice than to try and clean my registry.

Including backing up my registry and using a free tool called "JavaRA"  that could help me maintain my system and Java versions and updates very well... well I tried it and it didn't help... I was very disappointed but maybe my expectations were just too great.


5. No idea - desperation
I was quite desperate that my JDK ws not correctly installed. My applets weren't working. Eclipse stopped working at a certain moment. NetBeans - too. I even had to use system restore... a total disaster.

And I just migrated to Windows 7 Pro 64bit version... which seemed nice for user but apparently not for JAVA users... Using Win XP I didn't have such problems (although I think I had a similar problem a few years ago).
...
but I had a workaround!!

6. The workaround  - JDK 1.7 unofficial!
Well, I was lucky I accidentally installed JDK1.7 which is still unofficial and doesn't overwrite the latest JDK 1.6. So when I installed and played around with PATH and JAVA_HOME variables and Eclipse and NetBeans configurations, I was able to continue with my Java project development.
But I was still unsatisfied, because this is just a workaround !

A developer must never be satisfied with a mere workaround!

But time pressure and no work done payed its price.. I continued without worrying anymore.


until...

One lucky day JDK 1.6 update 20 came out!
I tried to install it - brand new version, no collision , installation successful and ... NO PROBLEMS NOW!

7. REAL SOLUTION - wait for new version to be released...

I dare to say that I dig deep into this shitty problem and... was beaten. I dare to say that only some sun guru can do better - only because they know where are their files and what can get wrong...


Total time spent:
2-3 days


Conclusion:
 Hope not to have problems with JDK installation...

No comments:

Post a Comment