octave-bug-tracker
[Top][All Lists]
Advanced

[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: Fri, 10 Aug 2018 18:15:37 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Update of bug #40111 (project octave):

                  Status:             In Progress => Ready For Test         

    _______________________________________________________

Follow-up Comment #29:

I pushed a change to fix the problems I am seeing with this feature on the
default branch:

https://hg.savannah.gnu.org/hgweb/octave/rev/374edade7b1b

Now the following work correctly

* if JAVA_HOME is not set, the compiled-in default is used
* if JAVA_HOME is not set on Windows, the registry is used
* if JAVA_HOME is set, but points to a non-existent directory, a directory
that is not a Java root, or the wrong architecture (e.g. a 32-bit Java on
x86_64), Octave issues an error message and Java is disabled
* if Java wasn't found when Octave starts, the user can use setenv inside of
Octave without quitting to try different directories until one is found that
works

Tests on Windows and macOS are highly encouraged!

Philip - rest assured that if JAVA_HOME is not set, which is the default
situation as you say on Windows, Octave will continue to look up the correct
Java to use in the registry, and that logic does not depend on any heuristics,
guessing, or attempting to use bin/client vs bin/server.

The only time Octave tries to use ${DIR}/bin/client vs ${DIR}/bin/server is if
the user chooses to set JAVA_HOME in the system environment or in their
working environment inside of Octave before loading Java.

If you want to test this on Windows, you would install another copy of Java,
that is of the correct bit width, etc, in e.g. C:\javatest\some\other\java,
start Octave, and test Java functions with and without JAVA_HOME set in the
environment. On my Debian system I used "javaMethod('getProperty',
'java.lang.System', 'java.version')" to verify that it was loading different
instances of Java with different values of JAVA_HOME.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40111>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]