Can't Get Mafia/Java to work together

ancient

New member
Using Windows 10 64bit and fully uptodate. Trying to install mafia again but get an error No Java found. did a fresh install of Java from Oracle AND the jdk versions of java. Still same error. Any ideas?
 

fronobulax

Developer
Staff member
How are you installing mafia? Just dropping the jar into a directory?

How are you running it? Double clicking on the mafia jar file?

Is Java on the path in your environment?

Can you open a command line, type "java -version" and get something like
C:\Users\CafeBabe>java -version
java version "13.0.2" 2020-01-14
Java(TM) SE Runtime Environment (build 13.0.2+8)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)

C:\Users\CafeBabe>

Do any Java jar files execute in your environment?

My guess is that your Java install is incomplete or bad but we might as well narrow down the possibilities.
 

philmasterplus

Active member
Some recent JDK installers don't add java.exe to the PATH environment by default. You might have missed some checkbox that reads "Add Java to PATH" or "Set JAVA_HOME" when installing the JDK or the JRE.

If you don't want to reinstall the JDK/JRE, you can manually update the PATH and/or JAVA_HOME variable. Check the Set Environment Variables section of this guide for an idea of what you need to do.
 

ancient

New member
C:\Users\ancie>java -version
java version "16.0.1" 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)

followed the above and still not able to get anything from mafia when opening it other than an error saying no java.
 

fronobulax

Developer
Staff member
File associations is the term that describes how Widows knows what program should open a type of file.

Right click on the jar file and then Open With. That should give you a way to select what to use to open the file and it should be Java. I can't grab a screenshot for you.
 

fewyn

Administrator
Staff member
I think it was almost no one used them and we only built them for point releases.
 

fronobulax

Developer
Staff member
Windows 10 doesn't seem to give me an open with, any suggestions?
I navigated to the directory with the Kolmafia jar, highlighted it to select it, used a right click and brought up the menu. Open at the top should be bold. If it isn't try and open the jar file and it should ask you to pick a program which should be java.

Screenshot 2021-05-01 154026.png
 

ancient

New member
Still not able to get mafia going exactly though I'd had some help sorta getting kolmafia 21 but not able to get it updated and this new github is 1000000000% confusing. Can I get some more advise in very basic terms.
 

MCroft

Developer
Staff member
If it doesn’t work, please report back directly. I have suspicions, but nothing to report yet…
 

MCroft

Developer
Staff member
We need to verify that those still work. I had problems with the macOS one as well.

@fewyn , which build is being used for the packaged version? And do you have the ability to update from Java 17 to Java 17.0.2? There's a fixed issue...
 

fewyn

Administrator
Staff member
We need to verify that those still work. I had problems with the macOS one as well.

@fewyn , which build is being used for the packaged version? And do you have the ability to update from Java 17 to Java 17.0.2? There's a fixed issue...
I don't have access the Github builds. But according to the actions log.



Java configuration:

Distribution: temurin

Version: 17.0.2+8

Path: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\17.0.2-8\x64


Jenkins is still using Java 16 (last big update I did 17 wasn't in apt yet)

JVM: 16.0.1 (AdoptOpenJDK 16.0.1+9)
 
Top