Octave can't find JRE while I have installed JRE

匆匆过客 提交于 2019-12-24 22:30:27

问题


I have installed JRE successfully:

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


回答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



来源:https://stackoverflow.com/questions/58815879/octave-cant-find-jre-while-i-have-installed-jre

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!