Posts Tagged ‘java’

building antlr 2.7.7 on Mac OS X

Saturday, April 28th, 2007

It appears that antlr on Mac os x doesn’t like the jikes compiler, at least when I tried building antlr it gave lots of weird compile errors like this:
Found 2 semantic errors compiling "ANTLRException.java":

While it would be a good thing to try to fix the actual code, it’s easier to see if the solution is already available.

The answer came in this posting which suggests renaming jikes before building. Which works, but there is an easier way. Just declare an environment variable before starting the build.


export JAVAC=javac
./configure
make

Changing the java compiler that gets used is documented in the configure script.

Java class file version numbering

Saturday, April 21st, 2007

http://alumnus.caltech.edu/~leif/opensource/bcver/BcVerApp.html

This page has a list which shows how java class version numbers relate to java platform version numbering. It’s useful if you get one of those UnsupportedClassVersionError errors.

This relates to the Java ClassFile structure which defines how classes are represented.