Jikes on Cygwin

One of my complaints about Cygwin is that there is no Java version. I suppose I could compile Blackdown on Cygwin, but I’m talking about Sun or IBM JDK’s here — something that I could really use. :) Of course, the biggest pain about using a native[1] JDK/JRE in Cygwin is that you have to transfer Unix paths into Windows ones. Which isn’t hard —

cygpath -dp $CLASSPATH

But, if you set a lot of paths and whatnot in your startups, this can be a pain. Luckily, today, I mucked with Jikes on my Cygwin install. Now life is better. :)

Jikes is in Cygwin’s setup, so just install it from there. And you have to tell Jikes where your main classes are for the JRE. In clearer English, you have to tell Jikes where your rt.jar is. This sounds a little hokey, but it means that you can compile your classes with any JDK — just tell Jikes what base classes to use.

This is how I run Jikes:

jikes -bootclasspath /cygdrive/c/j2sdk1.4.2_06/jre/lib/rt.jar -classpath My:Jars JavaClass

Why do this? Don’t I use Eclipse anyway? If I’m doing a lot of Java editing, I do use Eclipse, but if I just need to tweak something or do a little editing, Eclipse is too heavy — I prefer Emacs. This also let’s me do a Makefile, or at least makes the Makefile easier.

[1] What’s native in Java anyway?

Leave a Reply

You must be logged in to post a comment.