Octave can't find JRE while I have installed JRE

I have installed JRE successfully:

Screenshor

However, Octave keeps showing that it can't find JRE.

Upvotes: 1

Views: 5612

Answers (3)

Ivan Ricarte
Ivan Ricarte

Reputation: 1

From the screenshot you presented, you have the JDK (development kit) installed, not the JRE (runtime environment). The required commands you need are there, but the operating system does not recognize this automatically. For that, you must include the 'java/bin' directory from the JDK in the PATH environment variable for your system. Next time you run Octave, it will locate and recognize the Java environment.

Upvotes: 0

Akhil Shukla
Akhil Shukla

Reputation: 84

Make sure you installed right architecture(x86 or x64) of jre, it fixed the issue for me.

Upvotes: 1

littleBOT
littleBOT

Reputation: 1

Following https://octave.1599824.n4.nabble.com/Octave-4-installer-doesn-t-detect-JRE-at-install-time-td4670684.html and: https://superuser.com/questions/1382158/on-windows-why-java-version-return-error-opening-registry-key-software-javas

  1. run regedit.exe as Admin
  2. change CurrentVersion in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\ to 12.0.2
  3. create: HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\12.0.2
  4. set JavaHome in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\12.0.2\ to: C:\Program Files\Java\jdk-12.0.2
  5. open cmd and type: java -version
  6. in case of error type: where java
  7. cmd will return folder or few; in explorer go to the one ending with \javapath for example C:\Program Files (x86)\Common Files\Oracle\Java\javapath
  8. there should be files: java.exe javaw.exe and javaws.exe
  9. if so delete them, reopen cmd and type java -version

Now it should display correct version without errors

  1. In Octave type javachk jvm

if ans is empty java should be working now

Upvotes: 0

Related Questions