Why is getting Java so hard?


I just got through the pains of upgrading my JDK from 1.5.0_05 to 1.5.0_08 and I gotta say that it is a pain. Getting Java running on Linux and in Mozilla has historically been a source of much confusion. The confusion comes first from so many options to choose from. Should you just download the zip and deflate it? Should you use your package manager and install from there? If you use your package manager which version do you pick? GcJ? The free-java-sdk? If you pick one of the derivites which version of Java will it support? How about just going to the Sun web site? There’s an RPM? I’m running a Ubuntu/Debian based distro so I can use alien to convert the RPM right?

Well the last option is what I tried first. Download the RPM direct from Java ensuring I had the latest released version of the Java SE JDK and use alien to convert before installing. Before I could convert I had to extract it. You see the download was actually a self extracting archive containing the RPM, which means you need a command line to get at it. Ugh! Ok, break out Konsole and execute the self-extractor. I got into the habit of chmod’ing downloading files first to make them executable. Now I execute the file and I’m forced to read the EULA. Verbose text that very few people comprehend wiz by as I lean on the enter key. I’m finally berrated by the wizzing of the redundant question, “Do you accept the agreement?” After keying yes I breifly consider case sensativity as I wonder if my response was interpreted as a boolean true instead of a non-matching string compared to the literal “Yes” in some clunky C code routine. The extraction finally begins, 20 minutes have passed since I first clicked the download link (my net speed isn’t the greatest) and I still don’t have an RPM. The extration actually takes a couple of minutes on my P4 2.8 Dell with Hyper threading a beefy SATA HD and 2G RAM. I finally have an RPM that my linux distro doesn’t understand. (I’ve tried the right click “install RPM on debian” context menu option in KDE before and it didn’t work out too good.) Perfect! Lets convert it to a “.deb” and install it. Conversion takes a minute or so and I have a debian archive. Yay! I go back into my window manager because I still feel more comfortable there than in the shell and I right click the “.deb” file and choose to install. I get a console window asking me for my root password which I quickly satisfy with a flurry of my fingers across my keyboard tapping an all too familiar sequence. and now I have an installed version of the JDK right?

Not so fast!
After keying “java -version” on a command prompt I still see version 1.5.0_05-b05 in tact. I remember from my Mepis days (prior to switching to Kubuntu) a thread regarding upgrading/installing Java. A Google search of there old forums (thank God they didn’t delete them!) reveals the answer I think I’m looking for. I want to “update-alternatives –config java”. Running that command leaves me wondering why the newer version isn’t showing even after I confirm installation through Synaptic. I do another Google search to figure out how to add the binaries in as an alternative for the silly “update-alternatives” command and I find what I want at the bottom of this page. Ok after adding in the new binaries I am able to update to the newer alternative version of the JDK and run “java -version”. I get a ClassNotFoundException java.lang.Object. Realizing this is probably as serious as it sounds I resolve to the fact that I shouldn’t try a “Red Hat Package Manager” package on my Debian based system. (I’m thinking there’s something in compatibility that’s an issue but who knows at this point!) I then download the BIN installer as mentioned in the Mepis thread. Back to the drawing board.

Now what?
I extract again and read the next step in the thread. It says to use “make-dpkg”. Why I’ve never heard of that command before. Sounds like a cool way of turning any BIN installer into a Debian based package. Excited by my finding I mash the text onto my keyboard and am greeted by the familiar “bash command not reckognized” error. Tab auto complete confirms that command is not found on my system. A synaptic search for “make-dpkg” turns up nil too. I read further in the thread and refresh my memory that the command I want is “make-jpkg” which is a separately installable package that was not available to my Kubuntu using buddy way back when I was using Mepis and I first read the thread. (“Ha! My Mepis is way better than your Kubuntu crap!” I bragged at the time never realizing that one day I would come to depend on the same crap that was powering my buddy’s cloned version of my Dell workstation.) Nervously I search for the make-jpkg command and I’m re-assured when I find it in Synaptic. (I then remember back when the package finally did appear in the Kubuntu repos when I first switched over to Kubuntu.) Installing the package allows me to come up with the “.deb” file I’ve been dreaming about for the past 24 hours. (An etire day lapsed in between my initial attempts with the RPM and my new attempts with the BIN installer.) After installing the new deb archive I realize (after trial and error with “update-alternatives”) that the deb install overwrote my prior jdk version. This is aright with me as I don’t intend on moving backwards. Whew!

Now why did I go through all of that again? Oh yeah! I’ve been constantly plagued with a recurring Swing/KDE problem where windows open all crazy like on my system. After all of that hard work I don’t think the problem will go away. We’ll see. Holla at’cha man…

One thought on “Why is getting Java so hard?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s