News:

Precision Simulator update 10.180 (14 October 2024) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

macOS + Java problem

Started by foolen, Sat, 27 Mar 2021 15:42

foolen

Hi,

I've been running PSX + NG FMC successfully on Win 10 but copying the folder to my iMac (Catalina) and then trying to run it is not working. The problem seems to be Java-related, I get as far as the Java-icon opening and placing itself on the Dock and the top-menu in macOS changing to Aerowinx but that's it, the PSX loading-screen never comes.

I've tried moving the folder to Applications, as suggested in other treads, as well as switching between OpenJDK Azul, Oracle JRE 8 and the latest Oracle JDK but no luck.

The PSX error-log contains the following:

[Aerowinx Precision Simulator - Exceptions]

Exception in thread "main" java.lang.IllegalAccessError: class Core (in unnamed module @0x4ccc0db7) cannot access class com.apple.eawt.Application (in module java.desktop) because module java.desktop does not export com.apple.eawt to unnamed module @0x4ccc0db7
   at Core.startAll(Core.java:647)
   at Aerowinx.main(Aerowinx.java:65)

Any suggestions what I could try next?

Regards,
Andreas

Hardy Heinlin

Hi Andreas,

I've never seen this before. Do you have any special security settings in your Catalina System Preferences?

At the point where this error occurs, PSX just tries to get the Mac's application instance to set the Mac specific PSX desktop icon (which replaces the default Java icon).

Are you sure you switched between the various Java versions? Maybe the selected Java version was just displayed on the Mac's control panel, but PSX used always the same Java version?

If this problem persists, I could try to provide a user option to inhibit the Mac's icon loader function, then we'll see if that was the only cause of the problem.


Regards,

|-|ardy

foolen

Hi,

Thank for replying!

This is indeed very strange behavior. Since yesterday I have tried various methods for removing all traces of Java and doing fresh installs but the problem still persists. I've also tried unzipping the archive that I moved from Win 10 to macOS though iCloud, directly in the Applications-folder in case it might be inheriting some weird access-right or similar from the Desktop. Then tried removing the "no menu bar" setting in PSX to rule out any problems due to starting in full-screen but no luck.

Not sure what more I can do, appreciate if we could have a go at your suggestion with the user option.

Regards,
Andreas

Will

This is far beyond my scope of knowledge, but I'm intrigued by IllegalAccessError.

According to the Internet, "Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed."

Did running PSX in the Windows environment change something in the Aerowinx folder, putting some kind of stamp on how PSX invokes or starts Java?
Will /Chicago /USA

Hardy Heinlin

Hi Will,

that IllegalAccessError at that point can only occur when PSX runs on a Mac. PSX will not execute the Mac's icon loader when PSX detects it's running on Windows.


Hi Andreas,

before we search further, please try PSX update 10.133:

https://aerowinx.com/board/index.php?topic=4191.0

133.01. For Mac users: The Mac's PSX desktop icon loader can now be disabled in case a Mac-version-specific problem exists. To disable it, go to Aerowinx/Visuals/ and rename the file "iconMac.gif" to "iconMac.gif-up". The default Java icon will then be loaded.


Regards,

|-|ardy

foolen

Hi,

Just applied the update and renamed the file as per your instructions, happy to say it actually works!

Not sure what this means but I'm happy to help in any further investigations.

Thank you!
Andreas


Hardy Heinlin

Glad to hear.

It means your Mac's icon image loader was unhappy (for unknown reasons).

Is there still anything in your Logs/errors.txt?


Regards,

|-|ardy

foolen

Hi,

No, errors.txt is now clear.

Regards,
Andreas

Balt

Hi Hardy

did you ever find a solution for this? I'm running into the same problem with RealTraffic - macOS users don't seem to get icons anymore and the app doesn't start with current century JRE's...

Cheers

Balt

Hardy Heinlin

Hi Balt,

no, I just added a try/catch block to keep it clean (users need not rename the icon file).


Cheers,

|-|ardy

Balt

Ok thanks. There's a new java.awt.Desktop class which appears to do all the Apple classes used to do, and for the dock icon specifically, java.awt.Taskbar can be used, have a look here: https://docs.oracle.com/javase/9/docs/api/java/awt/Taskbar.html

Cheers

Balt