Standing on the Shoulders of Java

2:52 am General

I’ve only written a handful of Java code in my life, and most of it was during various Java labs in university. I’ve recently embarked on a project based on Java. We’re leveraging code that came out of Sun Labs. It’s proving to be an interesting, if a little hairy, learning experience.

First of all I figured that I had to relearn Java. Ooof. Fortunately I found The Java Tutorial which proved to be pretty useful, and with some background in GObject it was a nice easy learning curve in an isolated environment. I could easily compile the sample applications and work through them, step by step. Great.

Then I discovered what I can only call ‘The Java Complexity’. Oh my god, Java is BIG, and reading through the code already written for said project above made that even more obvious. I had to start looking at things like ant and jcloak, not to mention half of the standard API. Are people expected to remember this stuff? As funny as this sounds, it seems infinitely more complicated than your standard autotool and C based GNOME APIs!

Still, the project has to get done and I must learn. I’m terrified at every corner though. I thought having a look at Netbeans or Sun Java Studio might help me, but it feels like they’re just another variable on the stack right now which I don’t need. So plough on, I go…

And I find out that ant is not installed on my machine. Some SuSE packages don’t seem to help me here, since I have jdk-1.5.0_01-ea installed. So time to rebuild an RPM. I find some SRPMS and look at the spec files thinking ‘Hell, this should be easy’. The Red Hat one terrifies me. The SuSE one is workable though. And then I discover the ‘setJava’ script and /etc/java profiles. Crack.

Sigh.

So my startling discovery has led me to come to an uninformed opinion that Java just doesn’t feel ready for Linux right now, and certainly not JDS. It’s hard to accept, as a developer who currently doesn’t care about anything more than building and developing his application, the reason why there are multiple versions of Java right now. It feels that we [Sun] have failed in that respect by creating the root cause by a non-free Java. I originally started out with the goal of having a developer environment up in minutes, with all the various components installed – ‘plug and play’ comes to mind. Today has shown that is not the case, and I’m no closer to writing the lines of code that matter to me. We have much work to do.

Update: So I discover Netbeans has an ant module which helps quite a lot, thanks!

Comments are closed.