[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #40111] support runtime selection of Java with
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems |
Date: |
Sun, 12 Aug 2018 05:13:09 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 |
Follow-up Comment #31, bug #40111 (project octave):
An update after some more experiments:
* AFAICS the new Java JR selection works fine. After restarting my laptop dev
Octave (64b) could find the 64bit Java w/o problems on Win 7. Older 32bit
Octave and 64bit Octave also still find matching Java.
* On Windows, the path to the JRE should have forward slashes as file
separators. Backslashes in the JAVA_HOME setting don't work. Theoretically
this may interfere with other Windows programs that use a JAVA_HOME setting
and that do expect backslashes, although I'm not aware of any such programs.
* Selecting Java JRE only works the first time, before any Java call is
invoked. I think that's something to watch out for; it may provoke bug reports
from unwary users.
See here after starting Octave:
>> javaMethod ("getProperty", "java.lang.System", "java.version")
ans = 10
>> javaclasspath
STATIC JAVA PATH
- empty -
DYNAMIC JAVA PATH
- empty -
>> setenv ("JAVA_HOME", 'C:/Program Files/Java/jre1.8.0_162')
>> javaMethod ("getProperty", "java.lang.System", "java.version")
ans = 10
and here:
>> setenv ("JAVA_HOME", 'C:/Program Files/Java/jre1.8.0_162')
>> javaMethod ("getProperty", "java.lang.System", "java.version")
ans = 1.8.0_162
>> javaclasspath
STATIC JAVA PATH
- empty -
DYNAMIC JAVA PATH
- empty -
>> setenv ("JAVA_HOME", 'C:/Program Files/Java/jre-10')
>> javaMethod ("getProperty", "java.lang.System", "java.version")
ans = 1.8.0_162
* On 64bit Windows 10 (multiboot on the same laptop) 32-bit Octave-4.4.0 can't
find 32bit Java at all. I suppose that's a Windows 10 thing. On 64b Windows 7
it all works fine.
(I didn't notice before because I never run 32bit Octave these days)
* On wWindows 10, 64-bit dev Octave works fine incl. JAVA JRE selection
(again, before any Java method invocation).
* I cannot reproduce that pointing 64bit Octave to 32bit JRE mixes up Octave
(note difference between ../Program Files (X86)/.. = 32 bit and ..Program
Files/.. = 64bit JRE):
## Directly after starting Octave. Try to invoke 32b JRE w 64b Octave
>> setenv ("JAVA_HOME", 'C:/Program Files (x86)/Java/jre1.8.0_162')
>> javaMethod ("getProperty", "java.lang.System", "java.version")
error: javaMethod: library open failed: C:/Program Files
(x86)/Java/jre1.8.0_162/bin/client/jvm.dll
## OK, try 64b JRE then
>> setenv ("JAVA_HOME", "C:/Program Files/Java/jre1.8.0_162")
>> javaMethod ("getProperty", "java.lang.System", "java.version")
ans = 1.8.0_162
## Again try 32-bit JRE
>> setenv ("JAVA_HOME", "C:/Program Files (X86)/Java/jre1.8.0_162")
>> javaMethod ("getProperty", "java.lang.System", "java.version")
ans = 1.8.0_162
... so Octave seems to cling on to a working JRE it found before.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40111>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, (continued)
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Mike Miller, 2018/08/06
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Markus Mützel, 2018/08/06
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Philip Nienhuis, 2018/08/07
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Mike Miller, 2018/08/07
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Markus Mützel, 2018/08/07
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Mike Miller, 2018/08/07
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Markus Mützel, 2018/08/07
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Philip Nienhuis, 2018/08/08
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Mike Miller, 2018/08/10
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Philip Nienhuis, 2018/08/11
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems,
Philip Nienhuis <=
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Mike Miller, 2018/08/12
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Rik, 2018/08/14
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Philip Nienhuis, 2018/08/14
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Mike Miller, 2018/08/14
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Rik, 2018/08/15
- [Octave-bug-tracker] [bug #40111] support runtime selection of Java with JAVA_HOME on Linux and Unix systems, Markus Mützel, 2018/08/19