Tag Archives: java

Netbeans 6.5 on Debian

Doesn’t perform badly, I’ve been using it recently with Ruby code, and I like how it colourises the code to make editing code easier, and performs it auto-completion and method lookup (basically all the features you’d expect with a modern IDE).

It’s does’t startup as fast as using Emacs, or vi, but I find the features very handy and very convenient. It doesn’t look  bad either. It runs better on my PC at home running Debian Linux than it does on my PC at work running WinXP. This is probably because I’m using a 1.5 JVM on WinXP and a 1.6 JVM on Debian. Running on 1.6 JVM’s means that Netbeans will automatically use anti-aliased fonts if you have anti-aliased fonts enabled (much easier on the eyes if your using a LCD screen).

XSLT & 1.5 JVM’s

Oh bugger!

[junitreport] ERROR: ‘Unrecognized XSLTC extension ‘org.apache.xalan.lib.Redirect:write”

BUILD FAILED

Errors while applying transformations: java.lang.RuntimeException: Unrecognized XSLTC extension ‘org.apache.xalan.lib.Redirect:write’

See http://stefan.samaflost.de/blog/2004/10/29#XSLTC.

Basically, if your using XSLT transformations with a 1.4 JVM and upgrade to a 1.5 JVM, you will get errors because 1.5 JVMs use a different XSLTC transformer.

You can either try and force your build to use Xalan-J, instead of the one packaged with the 1.5 JVM. Or, change the namespace used:

From, for example:

xmlns:redirect=”org.apache.xalan.lib.Redirect”

to

xmlns:redirect=”http://xml.apache.org/xalan/redirect

Eclipse 3.3.2 and Debian

So I wanted to install Eclipse at home, the version that comes with Debian is 3.2.2-5 and I wanted to try 3.3.x and install WTP and some other plugins that aren’t packaged with Debian (anyone know why?).

After downloading and installing Eclipse the welcome screen would appear with an error message saying:

Error creating the view.

org.elipse.core.runtime.Plugin

This is because the default jvm or java executable on my system was one provided by gcj and for some reason Eclipse’s eclipse doesn’t seem to work properly with gcj (or I had a too old version), Debian’s 3.2.2 Eclipse packages seem to work fine with gcj. Gcj is an Open Source Java compiler provided by GNU.

Using Sun’s JVM solved this. To install Sun’s JVM, if you don’t already have it, issue the following command:

aptitude install sun-java5-bin

Debian uses what’s called alternatives, this means that the java executable /usr/bin/java is actually a symbolic link to /etc/alternatives/java which itself is a symbolic link to the real java executable. You can manually change the links in /etc/alternatives or run:

update-alternatives –all

And change all the java tools to point to the ones that come with the Sun JVM. Alternatively, you can install galternatives which is an easy to use GUI tool to manage alternatives.

Updated March 2008: Corrected misspellings, and grammatical mistakes.

Jetspeed build

Is borked! First, changes to some spring projects that it depends on broke the Jetspeed. Jetspeed uses Maven 2, so the spring it uses is an imported Maven project which had a depenceny that wasn’t required and was undownloadable and causes the Jetspeed build to fail. Now I get an error that few people can duplicate:

[echo] portlet-api.version=1.0
[echo] org.apache.jetspeed.deploy.version=2.1-dev
[echo] org.apache.jetspeed.deploy.groupid=org.apache.portals.jetspeed-2
Downloading: mockrunner/mockrunner/0.2.7/mockrunner-0.2.7.pom
[INFO] ————————————————————————
[ERROR] BUILD ERROR
[INFO] ————————————————————————
[INFO] Error executing ant tasks

Embedded error: The following error occurred while executing this line:
/tmp/CUSTOM_PORTAL1/portal-2/etc/build.xml:297: The following error occurred while executing this line:
/tmp/CUSTOM_PORTAL1/portal-2/etc/build.xml:302: The following error occurred while executing this line:
/tmp/CUSTOM_PORTAL1/portal-2/etc/build.xml:489: java.lang.ClassCastException: org.apache.maven.usability.MojoFailureExceptionDiagnoser

[INFO] ————————————————————————

Trying to see if I can get a successful build on my personal laptop at home … bugger same errors msgs.