It took a bit of digging around to figure out how to enable Java assertions for the Play framework, but the answer was simple in the end:
$ export JAVA_OPTS=-ea
This sets the (quasi-standard)
JAVA_OPTS environment variable which is incorporated into the SBT launch command.
Looks like the Ubuntu (jaunty amd64) build of Java 6 (1.6.0_13) has a problem closing files. Upgrading to 1.6.0_14 from karmic backports Works For Me.
Seems like it would be a big obvious bug, but I couldn’t find any reports. Have you run across it?
There are, it seems, crashers in recent Ubuntu 8.10 amd64 sun-java6-jre packages. Eclipse seems especially adept at finding them. Here’s the fix that worked for us. Add the following to your $ECLIPSE_INSTALL/eclipse.ini:
And some background:
Further releasing bits of code I have lying around: here’s Compressor.java, a lightweight (J2ME-friendly) range encoding compression algorithm in 4k of bytecode. Released under the LGPL.
Meanwhile on Wikipedia: Charlieplexing, Monte Cazzaza, RE/Search
I’ve got a few useful nuggets of code lying around that I’ve been meaning to open-source for quite a while. One of them is a Java/J2ME implementation of David Wheeler and Roger Needham‘s Tiny Encryption Algorithm. Today I tidied it up and stuck it online. It’s handy if you want a robust cipher in less than 2k of bytecode. You can snag it here.