Mercurial > hg > octave-lyh
comparison 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 |
comparison
equal
deleted
inserted
replaced
15762:a5475ba0d199 | 15763:56239ff815a3 |
---|---|
1 // Code used by configure script to locate Java installation variables. | |
2 // Only compiled code, OctJavaQry.class, is distributed. | |
3 public class OctJavaQry | |
4 { | |
5 public static void main (String[] args) | |
6 { | |
7 if (args.length > 0) | |
8 { | |
9 if (args[0].equals ("JAVA_HOME")) | |
10 { | |
11 System.out.println (System.getProperty ("java.home")); | |
12 } | |
13 else if (args[0].equals ("JAVA_LDPATH")) | |
14 { | |
15 System.out.println (System.getProperty ("java.library.path")); | |
16 } | |
17 } | |
18 } | |
19 } |