Java Support in Mac OS X

For Octave to be compiled with Java support enabled we need to have some requisite JDK installation and header files available in the host system where Octave is built. For cross-mingw compilation, it was fairly difficult. You can refer to the previous posts on this blog related to adding Java support for more information.

For Mac OS X, I installed the latest Oracle Java SE Development Kit from Oracle’s website. You need to accept the Oracle Binary Code License Agreement for Java SE to download the software.
checking for java... /usr/bin/java
checking for javac... /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/javac
checking for jar... /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/jar
checking for Java version... 1.6.0_51
checking for libjvm.dylib... /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries
checking for include file <jni.h>... /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers

This is the platform specific jni_md.h file  used by configure. It comes with the JDK installation for Mac OS X.

The following are extracts of the configure details of Octave:

Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Java JVM path: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries
Java CPPFLAGS: -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/include -I/System/Library/Frameworks/JavaVM.framework/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Headers -I/System/Library/Frameworks/Jav$
Java libraries: -framework JavaVM


Build Java interface: yes

Leave a comment