Bug - Not A Bug I can't open any .jar files after r25707 [Java 8 no longer works with Mafia]

Since the switch to Java 21, mafia no longer even comes up. Both machines (Win11) have the current JDK. Both have been rebooted since install, and since downloading the latest mafia version. I've been using r28237 since yesterday, and have no clue how to go about resolving this. Sincere thanks in advance for any tips/ideas!!
We have several versions of Java 21 available nowadays. Which one are you running?

FWIW, I'm running the Microsoft build of Java 21 on Windows 11 Pro. I have no problems with running mafia:
Code:
PowerShell 7.4.6
PS C:\Scripts> java --version
openjdk 21.0.4 2024-07-16 LTS
OpenJDK Runtime Environment Microsoft-9889606 (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Microsoft-9889606 (build 21.0.4+7-LTS, mixed mode, sharing)
 
I assume no longer comes up means you don't see the mafia GUI.

You might try running from a command window. mafia detects some errors on startup but they are never logged except to the screen. So opening a window and running from it will display any start up errors.

How do you start mafia? It is certainly possible file associations got trashed by the upgrade.

Run Task Manager and see if there are any Java tasks running? Start mafia and see whether there is evidence of a new Java task staring up.

I can give you more details if you need them and explain why something might be helpful but at the moment I am just tired of typing and editing to make sure my instructions are correct enough to work for me :-)
Nothing comes up at all, no mafia GUI, no error message, nothing. No idea what you even mean by "running from a command window", I'm hardware, software is all Greek to me. Sorry I'm so hopeless :cry:

I double click on the .jar from the folder where it lives in File Explorer.

Running Task Manager is the first thing I tried to see if I could find the issue. There was a flicker, but it went by so fast I can only assume it was Java, and then absolutely nothing.

Appreciate the effort of the reply and willingness to try to help. I hope my utter ineptitude with software doesn't break your brain 🤞
 
We have several versions of Java 21 available nowadays. Which one are you running?

FWIW, I'm running the Microsoft build of Java 21 on Windows 11 Pro. I have no problems with running mafia:
Code:
PowerShell 7.4.6
PS C:\Scripts> java --version
openjdk 21.0.4 2024-07-16 LTS
OpenJDK Runtime Environment Microsoft-9889606 (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Microsoft-9889606 (build 21.0.4+7-LTS, mixed mode, sharing)
Heh, sorry, I have no idea where to go to even find all that. It's the most recent version from Adoptium, so, probably the same?
 
Go to the search bar (instructions here: https://support.microsoft.com/en-us...anywhere-b14cc5bf-c92a-1e73-ea18-2845891e6cc8)

Then type "cmd" without the quote marks. The "best match" should be "Command Prompt". Single left-mouse click on that entry in the search results. You should now have a command prompt open.

Substitute "powershell" for "cmd" to open a PowerShell command window.

From either window type "java --version" without the quote marks and paste the output here.
 
Thank you! I had the latest one from Adoptium, went back and looked at it was more recent than the one I had from OpenLogic, so I went back to that one. It's the same version as BigVinnie's, but the GUI still won't open, and there's still no error message or signs of life on Task Manager :cry:
openjdk 21.0.4 2024-07-16
OpenJDK Runtime Environment OpenLogic-OpenJDK (build 21.0.4+7-adhoc.Administrator.jdk21u)
OpenJDK 64-Bit Server VM OpenLogic-OpenJDK (build 21.0.4+7-adhoc.Administrator.jdk21u, mixed mode, sharing)
 
Okay. Good start. Next you need to know where the KoLmafia .jar file is on your system. Where is it?

There are some locations that are better than others due to how Windows protections/permissions work.

Open a command prompt and navigate to the location of the KoLmafia .jar file using the "cd" command. Something like this:

cd c:\windows\users\<username>\downloads\<mafia location>\<jar file name>.jar

The above assumes that you put the .jar file somewhere under your downloads directory. Somewhere under your documents directory would be another good choice.

Where you replace <username> with your Windows username, <mafia location> with the name of the directory where the .jar file resides, and <jar file name> with the actual name of the .jar file.

Then, from within the command prompt window type
java <jar file name>.jar
If it generates an error message please post it here.
 
Okay. Good start. Next you need to know where the KoLmafia .jar file is on your system. Where is it?

There are some locations that are better than others due to how Windows protections/permissions work.

Open a command prompt and navigate to the location of the KoLmafia .jar file using the "cd" command. Something like this:



The above assumes that you put the .jar file somewhere under your downloads directory. Somewhere under your documents directory would be another good choice.

Where you replace <username> with your Windows username, <mafia location> with the name of the directory where the .jar file resides, and <jar file name> with the actual name of the .jar file.

Then, from within the command prompt window type

If it generates an error message please post it here.
I had no idea about the locations info, thanks for that!

This morning I finally got a Java exception error message on this box. Returning to Oracle's JDK 21 seems to have resolved whatever was going on with Adoptium's and OpenLogic's versions. Or...something? Because I just fired up the most recent mafia with 0 issues, GUI popped right up! Thank you for being so patient, and clear!! :love:
 
Back
Top