Fix Java 6 incompatibility, minor improvements.

Already committed into jEdit.

This fixes issue #7 (which i somehow missed, sorry).