Skip to content

Commit 063f2b6

Browse files
committed
doc octave java
1 parent 46a5b8a commit 063f2b6

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Readme_java.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,24 @@ For example, with Homebrew:
9191
```sh
9292
brew install octave openjdk
9393
```
94+
95+
If OpenJDK version updates, GNU Octave might not automatically find the new version:
96+
97+
> libjvm: failed to load
98+
99+
To correct this, find the path to the new JVM.
100+
Windows installs Java with Octave, so this usually isn't needed.
101+
For example, on macOS:
102+
103+
```sh
104+
gfind $(brew --prefix) -name libjvm.dylib
105+
```
106+
107+
Within Octave, tell Octave the directory that libjvm is under.
108+
This setting is not persistent.
109+
If it works, add the setenv() command to
110+
[.octaverc](https://docs.octave.org/interpreter/Startup-Files.html)
111+
112+
```octave
113+
setenv("JAVA_HOME", "/path/to/openjdk/")
114+
```

0 commit comments

Comments
 (0)