Author Topic: MegaMek, MegaMekLab, MekHQ with Mac  (Read 2662 times)

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
MegaMek, MegaMekLab, MekHQ with Mac
« on: 15 January 2018, 09:58:08 »
From the command line in the directory where the apps are located type:

To launch MegaMek
java -jar MegaMek.app/Contents/Resources/Java/MegaMek.jar

To launch MegaMekLab
java -jar MegaMekLab.app/Contents/Resources/Java/MegaMekLab.jar

To launch MekHQ
java -jar MekHQ.app/Contents/Resources/Java/MekHQ.jar

Brakiel

  • Master Sergeant
  • *
  • Posts: 230
Re: MegaMek, MegaMekLab, MekHQ with Mac
« Reply #1 on: 15 January 2018, 11:19:04 »
Hello! I tried with MML 0.43.7Jan14. Got the following:

Error: Unable to access jarfile MegaMekLab.app/Contents/Resources/Java/MegaMekLab.jar

System is macOS 10.13.2 with latest JDK 9.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: MegaMek, MegaMekLab, MekHQ with Mac
« Reply #2 on: 15 January 2018, 11:49:35 »
The above commands are confirmed to work with Java 1.8.xxx by one of the like two guys we have on Slack who use Mac (hardly have anyone on the team who uses Mac).  We are avoiding Java 9 with all the other OS releases as well so, I'd recommend avoid using Java 9 with the projects for now.  Wildj states Java 9 will work with them but you have to do and type in a bunch of extra stuff to get it to work, Java 8 is just more simple right now.

LightGuard

  • Master Sergeant
  • *
  • Posts: 303
  • They called him Camouflage
Re: MegaMek, MegaMekLab, MekHQ with Mac
« Reply #3 on: 17 January 2018, 15:55:54 »
The only way I've successfully gotten Mac MegaMek apps to work is to do the following:

1) Right-click on the app file (mekhq.app)
2) Choose Show Package Contents
3) Open Contents->Resources->Java and copy and paste all the files and folders in the Java folder into the directory you installed the app (Mine was mekhq-043.6-mac)
4) Launch the appropriate .jar file (mekhq.jar in this case)
5) Go have some fun!

So far, I've had zero issues getting this to run correctly, and I've been doing it since the last stable release.
The Things I Do for Love...

Do not try to apply real-world logic to Battletech.  Naught lies there but madness and ruin. - moneylovingogre4hire

That's fine, then.  I've been waiting since 2014 or so, what's another year?  Time laughs at all things, but BattleTech laughs at time.  Then launches a trial of possession for it. - rebs

rjhancock

  • Warrant Officer
  • *
  • Posts: 408
  • MegaMek Server Guy and Mac Enthusist
Re: MegaMek, MegaMekLab, MekHQ with Mac
« Reply #4 on: 10 August 2020, 17:42:31 »
I think this is an older topic, but as people are still referencing it I figured I'd post an update. macOS security has only gotten stricter since this post and will get more so upon the launch of Big Sur later this year (2020).

Use the Linux package of any of the programs and move the folder OUT of the Downloads folder (suggest the users Applications folder would be a good place). New security features will prevent most JAR files from loading under Downloads.

After that, from
a Terminal window, you'll need to launch them as follows:

Code: [Select]
java -jar MegaMek.jar
java -jar MegaMekLab.jar
java -jar MekHQ.jar

If Java is installed and configured, you should also be able to double click on the JAR files directly to launch.

As of yet, a reliable way to launch them as a packaged app has not been found as Apple keeps increasing security in macOS.

 

Register