Easy GNU gcj Java native compiler install on OS X

Tired of painful gcc/gcj builds on Mac OS X in order to get native Java compilation? Here is a Sourceforge project for high performance computing tools for OS X.

Gaurav Khanna (Physics Department, University of Massachusetts at Dartmouth) has pre-built gcj. Here is a link to a pre-built kit. Assuming that your web browser unGZIPed the file to gcj-bin.tar, just type:
sudo tar -xvf gcj-bin.tar -C /
to install in /usr/local. You can compile and run like this:
gcj --main=Test -o Test Test.java

For most purposes, stick with Sun's JDK and runtime kit - however, there are great reasons to also be able to generate native Java executables; for example: faster startup for small programs, test development targeted for Linux for GPLed projects that you do not want to use Sun's non Free Software kit for, etc.


Popular posts from this blog

Custom built SBCL and using spaCy and TensorFlow in Common Lisp

I have tried to take advantage of extra time during the COVID-19 pandemic

GANs and other deep learning models for cooking recipes