Archive for October, 2004

Looking for a Java Web Start JNLP 1.5 DTD?

Thursday, October 21st, 2004

Sun has created a DTD for the JNLP file format, but it’s only posted inside a PDF file on the associated JSR-56 page (on pages 62 to 75). Also, it contains a syntax error. So, I’ve extracted and fixed it using pdftohtml, and I’ve posted it on my website.

I have made the JNLP DTD available at http://kano.net/dtd/jnlp-1.5.dtd. To use it in your JNLP files, the beginning of your JNLP file should look like this:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Discriptor 1.1//EN"
 "http://kano.net/dtd/jnlp-1.5.dtd">
<jnlp ...

You might have noticed that Sun spelled “descriptor” as “discriptor.” I didn’t change this in my version because I don’t want to introduce any incompatibility if Sun posts the DTD themselves.

The PDF file I mentioned before suggests this incorrect DOCTYPE declaration:

<!DOCTYPE jnlp-discriptor PUBLIC
  "-//Sun Microsystems, Inc//DTD JNLP Discriptor 1.1"//EN">

This declaration doesn’t make sense because the root element of a JNLP File is <jnlp>, not <jnlp-discriptor>. Anyway, this DOCTYPE declaration should not be used.

Bug 4404764 on the Java Bug Parade, called “DTD is not available on java.sun.com”, is marked “Fixed,” indicating that the official DTD is posted on Sun’s site. However, the bug lists several URL’s where they thought it might go, but it does not exist at any of those URL’s. This is why I’ve posted it myself.

Wrong Java Web Start file association documentation at java.sun.com

Thursday, October 21st, 2004

Sun’s JNLP syntax documentation documents the syntax for the <association> tag incorrectly.

The wrong usage is:

<association>
  <mime-type="application-x/swingset2-file"/>
  <extensions="swingset2"/>
</association>

That’s not just wrong documentation, it’s invalid XML.

The correct usage is:

<association mime-type="application-x/swingset2-file"
  extensions="swingset2" />

I have filed bug 6182087 on the Java Bug Parade about this.

Guide: How to use Pack200 for your Java Web Start applications on Apache Web Server

Saturday, October 16th, 2004

Introduction

Lots of documentation exists about how to use Java 5’s new Pack200 JAR compression, with things like how to set up a Tomcat servlet to send its .pack.gz files with the right HTTP headers, and so on.

However, it is not clear how to use it in a more practical setting: an Apache web server. This weblog entry serves as a guide for how to get Pack200 working on Apache httpd. I don’t know if my method is the best way to do it, but it works. This method has been tested on Apache 1.3.31 and Apache 2.0.53.

UPDATE: I’ve updated the .htaccess file so it works on Apache 2.0 as well.

(more…)

Looking for automatic error reporting package for Java

Thursday, October 14th, 2004

I’m looking for a Java library that will automate exception reporting, like IDEA and Firefox do. For example, if somewhere in my application, an important or unusual exception is thrown, I’d like an automated way to ask the user if he or she wants to automatically report the exception to me through some kind of e-mail or (preferably) web-based service.

I can’t seem to find anything like this, so if you know of anything, please leave a comment below. Thanks.

Irritating Gnome Desktop bug marked WONTFIX

Tuesday, October 5th, 2004

An irritating feature of the Gnome desktop is that when you have a remote folder or a CD/DVD drive, you can’t drag it to the Trash to remove or eject it. I always assumed it was something the Gnome team had overlooked, but over on the Gnome bug tracker you can see that they like this behavior, according to Red Hat developer Alexander Larsson who marked this bug as WONTFIX.

I can’t imagine what went through Alexander Larsson’s head when he made that decision. Maybe the team doesn’t have time to implement it, maybe they don’t understand their users, maybe I don’t understand Gnome’s users.

It seems completely obvious to me that if I drag a desktop icon to the Trash, I want it to go away. I don’t care how it’s done, if it means dropping the remote folder connection, or ejecting the CD, I want the icon gone.