[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #40111] support runtime selection of Java with
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems |
Date: |
Thu, 29 Mar 2018 17:08:40 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 |
Update of bug #40111 (project octave):
Summary: Support runtime selection of Java version on Linux
and Unix systems => support runtime selection of Java with JAVA_HOME on Linux
and Unix systems
_______________________________________________________
Follow-up Comment #10:
I think it might be nice / easier to maintain if most of the filesystem logic
were written in a .m file function. ov-java.cc could export a simple DEFUN
that would accept the full file name of libjvm.so or jvm.dll to use.
See also bug #53389 for the same feature on Windows, would override the
Windows registry setting.
The logic for finding the JRE should be something like
arch_name = ## FIXME: how to set Java arch names?
java_home = getenv ("JAVA_HOME");
if (isempty (java_home))
java_home = __default_java_home__ (); ## FIXME: some compiled-in default?
endif
jvm_lib = [];
if (exist (java_home, "dir"))
tmp = fullfile (java_home, "jre");
if (exist (tmp, "dir"))
jre_dir = tmp;
else
jre_dir = java_home;
endif
dirs = { fullfile(jre_dir, "lib", "server"), ...
fullfile(jre_dir, "lib", arch_name, "server"), ...
fullfile(jre_dir, "lib", "client"), ...
fullfile(jre_dir, "lib", arch_name, "client"), ...
};
for i = 1:length (dirs)
if (exist (dirs{i}, "dir"))
tmp = fullfile (dirs{i}, "libjvm.so"); ## FIXME: or jvm.dll on Windows
if (exist (tmp, "file"))
jvm_lib = tmp;
break;
endif
endif
endfor
endif
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40111>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems,
Mike Miller <=