#On MacOS (26.0.1) NoClassDefFoundError
1 messages ยท Page 1 of 1 (latest)
Did you extract Megamek to a new directory or use an existing one? With the amount of changes in 50.07, it is best to use a completely new directory for Megamek
Is this Megamek, MekHQ, or MegamekLab?
How are you launching it? (eg: from Terminal, double-click on the jar, etc)
Since it is macOS, what location did you extract it to, what is the OS version, and is it an intel or M-series mac
Isn't there also something with Mac and protect folders.
If you search this forum I think this has come up before
Yeah, I'd like to know what directory OP extracted everything to
On macOS the desktop, documents, and downloads are protected folders, and any executables in those locations are potentially subject to gatekeeper, which can prevent access to other files by that executable
but running java from terminal to the jar file avoids most of this (but terminal has to be given full disk access rights)
I extracted to a new directory - Games off my home directory. Launched from a terminal 'java -jar Games/MekHQ-0.50.07/MegaMek.jar' MacOS Tahoe 26.0.1. I installed MegaHQ and am trying to run MegaMek.
When you were prompted with the message stating that it couldn't be opened for security reasons what did you select?
I did not get that prompt. I am running it from a terminal if that matters.
It looks like a 50.07 issue as 50.06 starts on my Mac.
However, when I click to see the documentation, as prompted by the "this is complicated" dialog, this is what I get:
And the reason the documentation window is tiny is probably because it is empty. The title says readme.txt. but the window is blank when I embiggen it.
That means it's failing to read the data directory
Ah, it looks like it is using relative paths from the terminal path where I started the jar. From outside the MegaHQ-0.50.06 folder everything is blank and broken, and if I start it within that folder it all seems to work.
That's why there isn't any visual stuff, like art, on that screen. Something, probably permissions, is prevent the app from accessing the data directory
Grand
Little by little you're getting there ๐
Presumably if I start it through Finder that wouldn't happen (it would start with CWD in the right folder).
Yeah, though depending on your Mac version (I forget when it was introduced) you may get a security pop-up (blame Apple for that one)
Should I file an issue against 0.50.07 for the uncaught exception?
Not if you're able to run it outside of command line
If you run through Finder you'll likely get his with this
If that happens, hit 'done' and then head to your security settings where you can tell it to run anyway
You'll then be prompted with a password request. Once done you'll be good until the next release.
(This happens for any unsigned app. We just don't have the money to get Apple to sign off on us, given we're a volunteer project and it is pricey)
Indeed, I get that pop up for 0.50.06 when trying to start it by opening the jar file in Finder.
Yeah, just make sure you're only hitting 'done' and 'open anyway' otherwise your Mac will remember you previously declined it and then will straight up refuse to open it again unless you jump through annoying hoops
Guess how I know that lil' nugget ๐
I can start 0.50.07 that way too! So it seems the command line error is probably related to MacOS being picky. 0.50.07 opens larger and therefore looks better than 0.50.06. Thanks!
The readme.txt still opens with the smallest possible window, but the content is there.
Yeah, that likely just means it doesn't have a default size set >_<
But I'm glad you got there ๐
It looks like the readme.txt needs updating as it refers to the "Host a New Game" button, which isn't here (I assume "Start a New Game" is the same button). How do I start a game against the AI?
Hopefully Discord will help others find my post if they get the same exception when trying to run.
Found it - Start New Game Player Setup Add Bot. The Bot readme also opens with no default size, BTW. This is in 0.50.07 as it looked nicer when I started it. Off to beat the Princess!