[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Java jni.h
From: |
Rik |
Subject: |
Re: Java jni.h |
Date: |
Fri, 07 Dec 2012 11:36:39 -0800 |
On 12/07/2012 11:10 AM, Michael D. Godfrey wrote:
> On 12/07/2012 02:05 PM, Rik wrote:
>> Try setting JAVA_HOME to /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64.
> I will try that, but of course it will break the next time java is updated,
> Is there a more persistent way
Probably. It's just going to take a while because this is so complicated.
One thing to do would be to do an all out search for a Java run-time
environment. If we could at least find that then we could use the
following Java code to find JAVA_HOME.
public class JavaHomeDirectory {
public static void main(String[] args) {
String javaHome = System.getProperty("java.home");
System.out.println("javaHome = " + javaHome);
}
}
This would mean compiling this code snippet into byte code and adding it to
the build system so that it was always available.
If you want to test that it works for you, put the code in
JavaHomeDirectory.java and then run
javac JavaHomeDirectory.java
java JavaHomeDirectory
It should hopefully point to
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/bin.
--Rik
- Java compilation warnings, Rik, 2012/12/06
- Re: Java compilation warnings, Richard Crozier, 2012/12/07
- Re: Java compilation warnings, Michael D. Godfrey, 2012/12/07
- Re: Java jni.h, Rik, 2012/12/07
- Re: Java jni.h, Michael D. Godfrey, 2012/12/07
- Re: Java jni.h, Rik, 2012/12/07
- Re: Java jni.h, Michael D. Godfrey, 2012/12/07
- Re: Java jni.h,
Rik <=
- Re: Java jni.h, Philip Nienhuis, 2012/12/08
- Re: Java jni.h, Michael D. Godfrey, 2012/12/07
Re: Java compilation warnings, Philip Nienhuis, 2012/12/07
Re: Java compilation warnings, Alexander Hansen, 2012/12/07
Java compilation warnings, John W. Eaton, 2012/12/07