Mark Watson’s Artificial Intelligence Books and Blog

Share this post

Easy GNU gcj Java native compiler install on OS X

markwatson.com

Easy GNU gcj Java native compiler install on OS X

Mark Watson
Jan 25, 2005
Share
Share this post

Easy GNU gcj Java native compiler install on OS X

markwatson.com

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

./Test

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.

Share
Share this post

Easy GNU gcj Java native compiler install on OS X

markwatson.com
Comments
Top
New

No posts

Ready for more?

© 2023 Mark Watson
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing