Mercurial > hg > octave-nkf
diff build-aux/OctJavaQry.java @ 15763:56239ff815a3
build: Overhaul auto-detection of Java when JAVA_HOME is not set.
* build-aux/OctJavaQry.class: Compiled code to help configure determine
installation directories. Exported in tarball.
* build-aux/OctJavaQry.java: Java code to help configure determine
installation directories.
* Makefile.am: Export OctJavaQry.class code in tarball.
* configure.ac: If JAVA_HOME is unset, attempt to find a Java executable.
Use java executable and Java code to try and determine necessary directories.
* libinterp/octave-value/ov-java.cc: Use JAVA_LDPATH variable to find libjvm.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 10 Dec 2012 13:15:08 -0800 |
parents | |
children | fafd51a1b0f0 |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/build-aux/OctJavaQry.java @@ -0,0 +1,19 @@ +// Code used by configure script to locate Java installation variables. +// Only compiled code, OctJavaQry.class, is distributed. +public class OctJavaQry +{ + public static void main (String[] args) + { + if (args.length > 0) + { + if (args[0].equals ("JAVA_HOME")) + { + System.out.println (System.getProperty ("java.home")); + } + else if (args[0].equals ("JAVA_LDPATH")) + { + System.out.println (System.getProperty ("java.library.path")); + } + } + } +}