Add support for building and installing jars for JVM.

This is tested on JVM. There is still one remaining test failure; LexoticException when running tester.t