#On MacOS (26.0.1) NoClassDefFoundError

1 messages ยท Page 1 of 1 (latest)

cyan ice
#

Java: 'openjdk version "17.0.16" 2025-07-15
OpenJDK Runtime Environment Temurin-17.0.16+8 (build 17.0.16+8)
OpenJDK 64-Bit Server VM Temurin-17.0.16+8 (build 17.0.16+8, mixed mode, sharing)'

Sentry appears to be enabled. Reproducible every time.

shadow osprey
#

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

graceful blade
#

Isn't there also something with Mac and protect folders.

#

If you search this forum I think this has come up before

digital edge
#

Yeah, I'd like to know what directory OP extracted everything to

shadow osprey
#

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)

cyan ice
digital edge
#

When you were prompted with the message stating that it couldn't be opened for security reasons what did you select?

cyan ice
cyan ice
#

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.

digital edge
cyan ice
#

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.

digital edge
#

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 ๐Ÿ˜„

cyan ice
#

Presumably if I start it through Finder that wouldn't happen (it would start with CWD in the right folder).

digital edge
#

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)

cyan ice
#

Should I file an issue against 0.50.07 for the uncaught exception?

digital edge
#

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)

cyan ice
#

Indeed, I get that pop up for 0.50.06 when trying to start it by opening the jar file in Finder.

digital edge
#

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 ๐Ÿ˜„

cyan ice
#

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.

digital edge
#

Yeah, that likely just means it doesn't have a default size set >_<

#

But I'm glad you got there ๐Ÿ™‚

cyan ice
#

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!