Tue 09 Feb 2016 09:18:38 PM UTC, comment #9:
Developers will still need a Java build system including a javac compiler and access to header files like jvm.h. The build system creates a Java library octave.jar which is distributed.
But at runtime the user should only need a JVM and the octave.jar file.
|
Tue 09 Feb 2016 07:58:49 PM UTC, comment #8:
I plan to look at this problem soon.
I'm sure I don't understand all the details, but my intent is to fix Octave so that finding the JVM library is done entirely at runtime. I think the only thing we need at build time is a valid jvm.h file.
|
Wed 04 Feb 2015 06:23:45 AM UTC, comment #7:
What about revising Pascal's patch in comment #4 to use the JAVA_HOME varibale?
|
Wed 04 Feb 2015 03:08:53 AM UTC, comment #6:
Hi Pascal, that is certainly one workaround for this problem, but ultimately I think we'd want to dynamically find the libjvm.so, and preferably using the semi-standardized JAVA_HOME environment variable.
On Debian we build with the path /usr/lib/jvm/default-java, for example
This makes it work with whatever the distro selects as the default Java, or in your case, the current version of Java 8, but it doesn't let a user pick a different Java runtime, for whatever reason they may need to do so.
|
Tue 03 Feb 2015 05:22:27 PM UTC, comment #5:
I compiled octave-3.8.2 on Fedora 21 x86_64. I think I solved the Java issue by not using the full path name of libjvm.so, but a link which will stay constant but be upgraded to the right location with java update.
The technique is to use (under Fedora):
./configure --with-java-includedir=/usr/lib/jvm/java-1.8.0-openjdk/include --with-java-libdir=/usr/lib/jvm/java-1.8.0-openjdk/jre/lib/amd64/server (other options ...)
Regards
Pascal
|
Wed 17 Dec 2014 04:45:04 PM UTC, comment #4:
This bug is still present in Fedora 21: after an upgrade of JDK, the java lib cant't be found anymore, up to the next recompilation.
I enclose a small patch adding a fallback mechanism. If loading the jvm lib from the static path fails, try a dynamic path built from the environment variable JAVA_JVM_LIB.
Regards
Pascal
(file #32686)
|
Mon 30 Sep 2013 06:01:24 PM UTC, comment #3:
The examples are meant to illustrate the logic for finding the jvm, not for copying into configure.ac.
Whether configure.ac is fine as it is?
Yes I'd agree with you, except maybe for Mac OSX; the examples contain some sections devoted to OSX as well.
|
Mon 30 Sep 2013 12:14:28 AM UTC, comment #2:
Your examples are all for configure scripting. I think Java detection in the configure script is fine as it is. This bug is about overriding the Java path at runtime by setting JAVA_HOME in the shell environment or in octaverc.
|
Fri 27 Sep 2013 02:06:13 PM UTC, comment #1:
For the automatic way, here are some links (from this thread:
http://lists.debian.org/debian-java/2009/04/msg00005.html):
http://gitweb.scilab.org/?p=scilab;a=blob;f=scilab/m4/java.m4;h=ace058ee88c6c9a876e22162bf4e62f5a6c2107c;hb=HEAD
http://gitweb.scilab.org/?p=scilab;a=blob;f=scilab/bin/scilab;h=65fd00adf4e1e38eeb2359f97e10bdb0a5c5ad41;hb=HEAD
(From what I can see in Octave's configure.ac there's already quite a bit of these implemented.)
I haven't looked whether these configure macros also detect the JVM on 64 bit systemes (where they reside in
$JAVA_HOME/jre/lib/<arch>/server
...rather than
$JAVA_HOME/jre/lib/<arch>/client)
(and my 'configure proficiency' is lacking anyway)
|
Thu 26 Sep 2013 01:07:40 PM UTC, original submission:
We currently hardcode the path to the Java runtime (specifically the libjvm.so library) in the Octave interpreter at compile-time. The library is not actually used at compile-time, since it is dlopen'd only when Octave needs it. It would be better if there was an ability for the user to override this path in the Octave interpreter at runtime.
The easiest and most obvious solution would be to keep the hardcoded path as it is now and allow the user's JAVA_HOME environment variable to override it.
More ambitious would be to do some kind of automatic determination of the Java path at runtime, but that's already hard enough as it is in the configure script.
|