Unable to start program

Damien

New member
So, I've recently starting playing again after some time, and I've found that I can't open the latest version of KoLmafia on my computer. I've downloaded all the files from the github and put them all in one folder, but nothing happens when I double click the .jar file, and I don't know what I need to do to open the .deb or .dmg files. Any help would be appreciated, and I'm running windows 10 in case that's important.
 

Damien

New member
So, I downloaded and ran the program it provided when I clicked on recommended java, so I assume that means I have it.
 

Magus_Prime

Well-known member
If you are running Windows 10, and Java is properly installed, you should able to open a command prompt and type
java -version
If you get back something like the following:
java version "17" 2021-09-14 LTS
Java(TM) SE Runtime Environment (build 17+35-LTS-2724)
Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)
Then you should be good to go. I normally run the .jar file directly from the Windows "Run" command.
 

Damien

New member
So, this is what I got:
openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)
Is this good?
 

MCroft

Developer
Staff member
So, this is what I got:
openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)
Is this good?
It's good. It means that the command line can find java.

The next step is to go to the directory that the KoLmafia jar file is in and type
java -jar KoLmafia*.jar

you can use the actual jar file name, but the wildcard helps if it's KoLmafia-2345.jar, etc...

If that runs, then you can play! You'd still have a problem getting Java to work with the Windows GUI.

Which is a general problem with your Java install. Java is a strange beast on Windows, and I am not a Windows user, so my only recommendation is googling "java jars won't open windows 10" and make sure you're looking at a recent result. You can easily find 11 year old advice on using Java 1.4.
 

fronobulax

Developer
Staff member
The next step is to go to the directory that the KoLmafia jar file is in and type
java -jar KoLmafia*.jar

You should open a command line before typing that, but it is still a useful thing to do. Mafia detects some errors on startup but they only go to the console. If you aren't running from a command line you never seem them. Some of those errors are fatal. A common one on Windows is that mafia is being run from a directory where it cannot create files.

The presence or absence of various mafia created subdirectories can be a diagnostic.
 

Damien

New member
Ok, I was eventually able to get it to work by using a .bat file to open the .jar file, so if anyone else is having a similar problem, that's how I solved it.
 
Top