You are currently browsing the archives for the Java category.

Eclipse plugin folder

On Ubuntu Linux, Eclipse expects to find plugins in the /usr/local/lib/eclipse/ folder.

Java in Firefox

I use Firefox 3.0.3 on Ubuntu. Java applets appeared as grey boxes. To fix this I uninstalled the Iced Tea plugin with sudo aptitude remove icedtea-gcjwebplugin. I then checked that there was a symlink in /usr/lib/mozilla/plugins/ pointing to /usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so.

On my installation the symlink in /usr/lib/mozilla/plugins/ points to another symlink in /etc/alternatives/ and that one points to the actual plugin. This means you can use the update-alternatives command to change the version of the Java plugin that your browser uses.

Platform dependent JNLP (Java WebStart) files

The Eclipse website explains it pretty clearly and independently of what IDE you use. I created a webstart for an app that uses rxtx. The RXTXcomm.jar file is the same for all platforms but the libraries (.dll, .so, .jnilib) are different and must each be encapsulated in a jar file.

A few things to check if your app doesn’t work.

  • Check that the native library jars contain the libraries at their root and not in a subfolder.
  • Respect the case for the os and arch fields.
  • When you rebuild new jars don’t forget to sign and upload them to your webserver again.
  • Check that you are using the correct version of Java. If your app only works with a certain version you can specify it in the jnlp file.

On GNU/Linux I can run javaws http://my.domain/codebase/mywebstart.jnlp to debug the application but on Windows the command line javaws doesn’t print any output to the console. I don’t know how to easily view System.out.println output from webstart applications on Windows.