Author Topic: MegaMek doesn't can't find java install (0.47.11-dev)[win 10]  (Read 2451 times)

jayoung

  • Recruit
  • *
  • Posts: 16
I recently upgraded my computer and reinstalled windows. When I setup my new computer I installed AdoptOpenJDK instead of the oracle one. This has worked fine with other java programs I have run.

When I double click on MegaMekLab.exe I get a pop-up saying "This Application requires a Java Runtime Environment 1.8.0" then when I click OK it takes me to the oracle download site.

If I open a command prompt, I can cd to the MML directory and run MML manually, via "java -jar MegaMekLab.exe" and it works fine.

In the command prompt, I can type "java -version" I get
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
OpenJDK Client VM AdoptOpenJDK (build 11.0.10+9, mixed mode)

when I run "echo %JAVA_HOME%" I get
C:\Progra~2\AdoptOpenJDK\jre-11.0.10.9-hotspot\

When I type "path" I get
PATH=C:\Program Files (x86)\AdoptOpenJDK\jre-11.0.10.9-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\AOMEI\AOMEI Backupper\6.5.1;C:\Users\<MY USER>\AppData\Local\Microsoft\WindowsApps;

To me, it looks like my environment variables are set up correctly. Is there one I missed? Or will MegaMekLab.exe strictly only launch from an oracle install?

elf25s

  • Major
  • *
  • Posts: 4434
Re: MegaMek doesn't can't find java install (0.47.11-dev)[win 10]
« Reply #1 on: 15 June 2021, 09:03:35 »
you may have to clean re install java it usually solves most problems...
you sure cannot out run death...but sure as hell you can make that bastard work for it!

Hammer

  • Numerorum Malleo
  • Global Moderator
  • Major
  • *
  • Posts: 4139
    • MegaMek Website
Re: MegaMek doesn't can't find java install (0.47.11-dev)[win 10]
« Reply #2 on: 15 June 2021, 09:19:21 »
That's also a very old version of MegaMek. Trying updating to the 0.48.0 Stable link in forum above.
MegaMek Projects Wiki
Bug Trackers
MegaMek Tracker
MekHQ Tracker
MegaMekLab Tracker
New Units and RAT's aren't added until after the 2 month release moratorium is passed.
Join the official MegaMek Discord

jayoung

  • Recruit
  • *
  • Posts: 16
Re: MegaMek doesn't can't find java install (0.47.11-dev)[win 10]
« Reply #3 on: 15 June 2021, 10:38:27 »
uninstalling & reinstalling java worked! Glad it was something simple. Thank you! (I will also upgrade MML to latest stable now).