The Inquirer-Home

Java install on Linux is pants

One Mad Geek ATI! Oh linux, where is thy sting?
Sun Oct 01 2006, 19:18
SUN MICROSYSTEMS says it's serious about Java on Linux. But the process of installing the Java runtime leaves a lot to be desired, and here is why.

First, there's so much BS and baloney thrown around about Java that I must be breaking an unwritten rule of IT journalism by saying that I like Java, a lot, and I run Java programs on several of the PCs on my home network on different operating systems. Why? Because I enjoy having the same application no matter which OS I'm running at the moment, and the freedom it gives me. The upcoming open source releases of the technology will make this even more so.

Java is good, the install experience is not
But since I've seen so many unwarranted Java-bashing tirades, let me indulge for a paragraph or two in some Java-highlighting before I go into the current problems with it. This is not only about "applets", which is the 1996 idea of Java. This is about running full blown desktop applications as well. In case you haven't been paying attention lately, client side - desktop apps - in Java have been growing in speed and quality by leaps and bounds. For instance one of the most popular and active projects at Sourceforge, and one of my personal favourites is the ubiquitous Azureus P2P client, which helps me with the easy download of linux distros and movies -yes there is legal content offered over BitTorrent. Check out the list of some outstanding desktop applications at the "L'INQS" section below this article.

With the upcoming release of JSE 6.0 supporting features like antialiasing for smooth text and even more Gnome integration and "Vista look and feel" using native widgets on Windows- I expect that this is going to further accelerate the popularity of Java development. Java applications can be made to interact with the desktop and behave almost identically to native code, with features like docking to the system tray -in windows and linux-, or calling the system's default web browser or email client, all features once out of the realm of Java, thanks to a project known as "Desktop Integration Components" or JDIC which can be found at the Java.net site over here.

You see by now that I'm not criticizing Java from the "OSS purist" side or with the hidden agenda of promoting something else. So, why am I writing this "Java on Linux is pants" kind of story? Because while it's technically possible to code such nice applications - that run unmodified on Linux, Windows, Solaris and Mac OS-X - the joy only starts when and only *if* the Java VM is already installed and operational. But the biggest threat that Java faces today is the ugly install experience on non-Windows OSs.

I'll be blunt: installing the latest release of Java currently available - Java SE 5.0 update 6 - is frankly a nightmare on Linux specially when compared to the button-clicking exercise on Windows, and it's been like it since I first touched Linux around 1999. It is worse than comparing a "day and night" scenario, more precisely, it's comparing an installer - on WinXP - with "essentially nothing" on linux.

A picture is worth a thousand words
alt='javalinux-1'
The "automatic" Firefox plug-in finder says JRE not available, forces "manual download"

Much to the outrage of Firefox fans, I once suggested that the ubiquitous open source browser should be also offered as an option with Sun's JVM runtime bundled, but needless to say very little I had to say about the browser was taken into account.they didn't seem to care.

It is often said that "a picture is worth a thousand words". So here are the problems:

Exhibit number one: the web browser should be able to easily initiate a download and system-wide installation of the Java VM

The Java plug-in redirector URL at Netscape.com is gone

When any of the Mozilla based browsers find a Java applet, and you have no Java installed in your system, you get the "applet" icon, one similar to a broken link or broken image. When you click on it, Mozilla - and SeaMonkey as well, this must be a hard-coded URL somewhere in the source code - tries to load "plug-in finder" page at Netscape.com. But there is a problem: AOL's clueless marketers have erased all traces of the old Netscape web site, and the JVM redirector URL in the process.

The Java redirector URL which was a great idea, and it used to be located at wp.netscape.com/plugins/jvm.html. When I hit that URL a few months ago, I noticed that instead of redirecting and landing in the Java download page, it ended up instead going to... the Netscape 8 browser download web page. A now-comatose web browser which, funnily enough, is not offered for linux and worse, no longer comes bundled with Sun's Java VM nor does it offer Java as an option during the "custom" installation mode - at least it didn't the last time I evaluated it.

alt='javalinux-4'
Applet plug-in finder redirector URL is gone?

I'm not sure why I ended in that URL but certainly it should be useful to restoring the /plugins/jvm.html redirector and make it go to www.java.com, even if only as a goodwill gesture. I'm sure that it is being hit by the hundreds every day.

Exhibit number two: even Sun destroys its own Java-download redirect URL?
Using SeaMonkey, the browser suite which succeeded Mozilla, when you hit a Java applet with the right embedding tag, and there's no Java installed in your system, you get a dialogue that reads "Click OK to download plug-in". After you click OK, the browser loads the URL http://www.java.com/jsp_utils/?application/x-java-applet which gives a nice message "Sorry! We couldn't find the document requested. The file that you requested could not be found on this server. If you provided the URL, please check to ensure that it is correct. If you are certain that this URL is valid, please send us feedback about the broken link". Beautiful!.

alt='javalinux-3'
Plug-in finder in SeaMonkey

Did I mention I first sent feedback about this about four months ago, and it's still broken?. Can you feel my blood boiling yet?. This landscape of broken links shows how little attention everyone concerned is paying to the end-user experience. My main point here is that there are mechanisms in place that were designed to make the user experience of installing Java an easy one, and they currently make the user go around in circles because each company that should have maintained its redirector URL s in place and working decided they no longer cared - yes, AOL and Sun, in that order.

alt='javalinux-5'
Applet plug-in finder redirector URL is gone?

Sun's gaffe is even more worrying, first because they make Java, and second because I informed about the broken URL and nothing has been done. OK, there is a chance that this might be limited to the SeaMonkey and Mozilla browsers which are not used by the majority of users. So what happens when you hit a Java enabled web page, a "Java web start" link and the like with the ubiquitous Firefox 1.5 web browser on Linux?. You get the "plug in finder" dialogue... and at the end of it... you are redirected to the "manual installation" page at Java.com.

Java installer on Linux. The lack
Even companies which ignored Linux for a long time, like ATI, showed recently that it's possible to make an almost-perfect, friendly GUI installer for Linux giving a point and click experience to the end user. And it's interesting to mention that installing StarOffice 8 and OpenOffice.org on Linux *is* a point and click, user friendly experience. So why can't Sun do the same for the Java VM?.

I understand the position of some folks - specially corporate system administrators - who might prefer the "silent" text-mode way of installing Java using RPM or the crude yet effective unpacking of an archive at the current directory location from the bash shell, but that doesn't mean that end-users shouldn't have the same friendly experience available for Windows users as an option.

alt='javalinux-2'
I download and "install" the RPM. Files are only copied around
I'd still have to manually tweak the PATH to make it available system-wide
and also create symlinks to the SeaMonkey browser. WHY?

Desktop integration. More lack thereof
I found it outrageous that any old Linux user is supposed to go and follow these nasty directions to manually create symbolic links to the plug-in libraries on each web browser installed on the linux system, in order for the Java VM to be "enabled". On WinXP with Sun's Java v1.5, after installing the runtime, you can simply drop a .JAR packaged Java application on the Windows desktop, double click on it -as if it were a .exe file- and the "java -jar" launched is invoked on it, giving the end user the same friendly experience as dealing with native executable applications.

On Linux, clicking on a .jar file always produces a myriad of different effects, but I have yet to found a linux distro where I can download and double click on a jar file and launch a Java application -Sun's now-defunct JDS Linux was very close, indeed. Since Sun has a lot of interest in Gnome, why can't the company's Java and Gnome teams agree on the default association for .jar files on the Gnome desktop? Why can't the java install process on Linux automatically add itself to the system path just as it happens when doing the same installation on WinXP?. I don't want to have to edit .bash_profile ever again! [And we don't want ever to turn linux lower case into upper case Linux ever again. Ed.]

Conclusion:
Installing Java shouldn't be like this. This comedy of errors of broken URLs and lousy text based installers that don't install just copy files around without any further configuration and which require the end user to then manually go and create symlinks by hand on the browsers is a disgrace. Sun has promised improvements in the upcoming version six, code-named Mustang, but I will believe it when I see it. In the meantime the company should get in touch with its own webmasters at Java.com along with the Netscape.com folks to have the redirector URLs fixed. It is essential that the Java 6.0 install experience is as user-friendly in Linux as it is on Windows. If Sun coders need inspiration, they can go and look at the ATI linux drivers installer, for instance.?

See Also
Java 6 shows maturity
Apache's open source Java VM making progress
Sun will open source Java "in months"
Apache to "cleanroom" Java with Sun's blessing
Sun releases Java 5 also known as 1.5.0
Intel donates Swing code to Apache's Open Source Java
JDIC - Create Java apps that minimize to systray or Gnome panel, call the system's default web browser, and more

L'INQS
Azureus
Phex - Gnutella P2P client
jlGui: a java internet radio tuner that also works as mp3 player
Art of Illusion - 3D modeling application written in Java
EIOffice 2007 beta
Opcion - Cross-platform, Java based TTF Font Viewer
CrushFTP - Java GUI FTP Server
jAlbum - Web photo album generator
JPhotoBrush Pro - Photo Editor for Java
jCommander - Cross-platform File Manager
Sketsa - SVG vector graphics editor
jEdit Programmer's editor
Freecast - A peer-to-peer streaming solution
JBuddy Instant Messenger
BlogBridge - Blog and newsfeed aggregation

 

Share this:

blog comments powered by Disqus
Advertisement
Subscribe to INQ newsletters

Sign up for INQbot – a weekly roundup of the best from the INQ

Advertisement
INQ Poll

Heartbleed bug discovered in OpenSSL

Have you reacted to Heartbleed?