Java News from Sunday, January 23, 2005

Sun's posted the second alpha of the NetBeans Integrated Development Environment (IDE) 4.1. This early access release is available for Windows, Linux, and Solaris (but not Mac OS X). New features in version 4.1 focus on Enterprise JavaBeans and Web Services. Alpha 2 "adds support for developing applications for the J2EE 1.4 Platform and their deployment to the Sun Java™ System Application Server Platform Edition 8 2005Q1." Final release is planned for April, 2005. Java 1.4.2 or later is required.


Etienne Gagnon has released version 1.1.9 of SableVM, a Java bytecode interpreter (that is, a virtual machine) written in C. "SableVM requires an ANSI/ISO C compiler (but preferably GCC) and a POSIX platform. It requires a strong memory model (sequential consistency) on multiprocessor systems." SableVM is available for GNU/Linux, Solaris, and FreeBSD. Version 1.1.9 improves JNI support and adds some missing system-dependant Java properties. It updates the bundled version of GNU Classpath to 0.13. It is now possible to run Eclipse without providing Xerces and Xalan. SableVM is published under the GNU Lesser General Public License (LGPL).

The developers claim claim it's written in portable C, and runs on Mac OS X, but I couldn't compile it there. Something about "libffi is missing". is written in portable C, and runs on Mac OS X, but I couldn't compile it there. Something about "libffi is missing". So I booted up my Linux desktop for first time in a few weeks (I've needed it less and less since moving to a new PowerMac desktop a few months back, and I may even nuke it and reinstall Windows depending on what my next book project since the Mac seems to do almost all the Unixy things I need to do though not, apparently, run SableVM.) and tried to compile it over there. Hmm, this one also dies with "libffi is missing" in configure. OK, let's search the Wiki. Hmm, various information, none of it precisely on point. After some hunting around, I find myself back on the download page where I notice, "IMPORTANT: If you do not already have it on your system, you can find the source code of the required libffi library at: http://sablevm.org/download/snapshot/2005-01-21/libffi-sable-3325.tar.gz". I probably should have paid attention to those big red letters.

Let's try this again. Download libffi. ./configure. make. make install. Oops. Forgot to sudo that last step. Try again. sudo make install. Back to the SableVM directory. ./configure. A new error message, "***ERROR: libpopt is missing". Hmm, what's that? Seems like fink can find this one though, so "fink install popt". ./configure again. Nope. Still getting "***ERROR: libpopt is missing". So much for the Mac. Let's try this on the Linux box again.

libffi compiles and installs. Good. Back to the SableVM directory. This time ./configure completes successfully for the first time. I guess Linux already has libpopt installed. Now let's make SableVM. That took a couple of minutes, but appears to have succeeded. sudo make install and we're done.

Now for the acid test: can SableVM pass XOM's unit test suite? Last time I tried this, it failed but that was over a year ago. OK, back to SableVM. It seems it can't even load my Hello World program:

*** Fatal error: Unable to load essential class java/lang/Object.
*** Most probably it was not found on boot classpath:
*** /usr/local/share/sablevm-classpath:/usr/local/share/sablevm-classpath/libclasspath.jar:/usr/local/share/sablevm-classpath/resources.jar
sablevm: cannot create vm

The message is right. It's not there. I wonder why? Hmm, looks like ther's a separate distribution of the classpath I also have to download and install. I wonder why the install page didn't bother to mention that? Not that documentation is a particular hallmark of open source projects. (I've tried to be much nicer about that in my own XOM, which I think has pretty good documentation relative to most class libraries.) One more time: ./configure. Nope. There's another problem:

checking for gtk+-2.0 >= 2.4 gthread-2.0 >= 2.2 libart-2.0... Package libart-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libart-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libart-2.0' found

configure: error: Library requirements (gtk+-2.0 >= 2.4 gthread-2.0 >= 2.2 libart-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

I could probably resolve this one too, but I have this nagging feeling that fixing this problem would require upgrading my entire Linux distro, and I'm just not up for that today. I've been listening to the ridiculously load fan on the Linux box for far too long now. I forgot how noisy the Linux box is. I can't believe I put up with that fan noise for two years. So I'm going to power it down, and try to get on with some real work.


Ben Litchfield has posted PDFBox 0.7.0, an open source (BSD license) Java library for manipulating PDF documents and extracting contents from existing PDF documents. This release adds support for PDF 1.5.