Can't get started - "No Java?" despite Java install + Path defined correctly - Windows 10

shockeroo

New member
Hi all, I've read various guides and searched the forum but can't find how to proceed from here. Apologies if this is covered somewhere but I can't find any resource that solves my problem.

On Windows 10, KoLmafia-21.9.exe returns "No Java?" and a blank box with OK and Cancel boxes that both seem to do nothing. I have installed the latest JDK, and path is defined in Environment Variables, and I have restarted since installation. I have also expanded Kolmafia-21.9.jar to a folder but that doesn't seem to give me anything to run and I can't find a way to integrate it with Greasemonkey.

(I'm a bit of a noob here, I used KoLmafia about 15 years ago but it's the only Greasemonkey script I've ever run and barely remember anything from back then. Any advice appreciated, or any link to a guide that references this situation or a critical step I've missed, I would be very grateful. Thank you!)
 

fronobulax

Developer
Staff member
First, the exe distributions have an unwanted feature of overwriting all your existing settings. So we no longer distribute them.

The preferred way to do things is to
  1. Install Java
  2. Download a jar file from https://ci.kolmafia.us/
  3. Run the jar
When you want to update, repeat steps 2 and 3.

So the first thing to do would be to open a command line (or console). Type "java --version"

You should get something like
java 17.0.4.1 2022-08-18 LTS
Java(TM) SE Runtime Environment (build 17.0.4.1+1-LTS-2)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.4.1+1-LTS-2, mixed mode, sharing)
If you don't then Java is probably not installed correctly.

Next, change directory (in the console0 to the directory containing the jar you downloaded. Note you probably don't want to put the jar on the Desktop because Windows is fiddly about file permissions.

Type "java -jar <name of the kolmafia jar file>"

That should run mafia.

If that works and java was correctly and completely installed you should also be able to run mafia by double clicking on the jar but you should try this way first because if there are things that don't work, there might be some error messages written to the console.

AFAIK GreaseMonkey only works with Firefox. KoLmafia only works with whatever browser is the system default so you may need to adjust settings or expectations.
 

shockeroo

New member
First, the exe distributions have an unwanted feature of overwriting all your existing settings. So we no longer distribute them.

The preferred way to do things is to
  1. Install Java
  2. Download a jar file from https://ci.kolmafia.us/
  3. Run the jar
When you want to update, repeat steps 2 and 3.

So the first thing to do would be to open a command line (or console). Type "java --version"

You should get something like

If you don't then Java is probably not installed correctly.

Next, change directory (in the console0 to the directory containing the jar you downloaded. Note you probably don't want to put the jar on the Desktop because Windows is fiddly about file permissions.

Type "java -jar <name of the kolmafia jar file>"

That should run mafia.

If that works and java was correctly and completely installed you should also be able to run mafia by double clicking on the jar but you should try this way first because if there are things that don't work, there might be some error messages written to the console.

AFAIK GreaseMonkey only works with Firefox. KoLmafia only works with whatever browser is the system default so you may need to adjust settings or expectations.
Thank you; "Type "java -jar <name of the kolmafia jar file>"" is what I needed to get going! :)
 

salayer

New member
Hi, I'm new to Kolmafia even though I've been playing Kol for more than ten years. I'm a bit of a dummy when it comes to downloading and installing. My son usually does it but he is away at the moment. I've gotten as far as:

You should get something like
java 17.0.4.1 2022-08-18 LTS
Java(TM) SE Runtime Environment (build 17.0.4.1+1-LTS-2)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.4.1+1-LTS-2, mixed mode, sharing)
Can you explain this to a 5 year old.
Next, change directory (in the console0 to the directory containing the jar you downloaded. Note you probably don't want to put the jar on the Desktop because Windows is fiddly about file permissions.

Type "java -jar <name of the kolmafia jar file>"

I've finally decided to attempt the basement but I'm getting nowhere.
 
Last edited:

fronobulax

Developer
Staff member
Hi, I'm new to Kolmafia even though I've been playing Kol for more than ten years. I'm a bit of a dummy when it comes to downloading and installing. My son usually does it but he is away at the moment. I've gotten as far as:

You should get something like

Can you explain this to a 5 year old.


I've finally decided to attempt the basement but I'm getting nowhere.

I'm not sure what to clarify for you. Do you have some uncertainty about how to run the command or is "something like" too vague to be useful? Basically the command is one way to confirm java is correctly installed and "something like" means "the numbers may change depending upon when you run the command and which version of Java is installed".
 

salayer

New member
so sorry, I couldn't understand the next step, to change directory in the console0. Do I type "java -jar <name of the kolmafia jar" file next in the very same command prompt or do I open a new command prompt for the script mafia file(I'm not sure I'm explaining correctly). something like this.


Screenshot 2023-01-16 112945.png
 
Last edited:

fronobulax

Developer
Staff member
Ok.

changing directory in the console is done by the command cd.

On my system the mafia jar file is in c:\kolmafia\dist so I would type the command

Code:
cd

the response will be

Code:
PS c:\kolmafia\dist>

You would then type

Code:
java -jar KoLmafia=27099.jar

and mafia should run.

My example used angle brackets around some text. The angle brackets are not part of the command you type. That wasn't clear on my part.

If you did not put the jar in c:\kolmafia\dist then you will need to adjust what I typed to use your location.
 
Top