How to enable assertions in the Play framework

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.


Eclipse crashing in 64-bit Ubuntu?

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:

Lightweight Encryption for Java/J2ME

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.