.JAR file issue

ancient

New member
recently updated computers. the .exe versions of mafia work after installing java but when I try to open a .jar it wants me to choose a file to open and only wants to let me try to use the kol installer. any ideas?
 
Tangentially, the exe versions of mafia are no longer supported because under some circumstances what should be an upgrade clears all settings. Until we figure put why, it is safer to not create or support that packaging.
 
uninstalled and reinstalled adoptium and seems to be working but getting error could not acquire file lock for *my username*
 
Even with a completely empty sessions folder open the jar and try to log in and get this

If sessions/ is empty then the only other thing I can think of is that KoLmafia cannot write to sessions/

Hopefully you are comfortable determining whether the user running KoLmafia has permission to write to sessions/ If you aren't then there are things that could be tried and I will list some of them.
 
Does this work on a build older than r27042? I suspect / hope the answer is "no", since if you were encountering this class of error before, then Mafia would automatically terminate during startup. Frono's explanation makes sense, although it would still be useful if we expanded the error message to give more details (at least something that's helpful for us devs to troubleshoot what went wrong).

(Right now, if we encounter problems during startup, we discard the details of the exception and just say "we failed to grab a lock".)
 
I looked through the code and the only failures I could see were in file creation and in getting the lock. Since the report was of an empty directory I guessed it was not caused by the lock, nor trying to access/overwrite an existing file. Since the fix is in, I hope the OP will get a jar with the changes and give feedback.
 
Hi, I tried build r28099 and got this output error:
C:\kolmafia-main>(call gradlew.bat)2>&1>"logfile.log"

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'KoLmafia'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve com.diffplug.spotless:spotless-plugin-gradle:6.23.3.
Required by:
project : > com.diffplug.spotless:com.diffplug.spotless.gradle.plugin:6.23.3
> Dependency requires at least JVM runtime version 11. This build uses a Java 8 JVM.
> Could not resolve org.ajoberstar.grgit:grgit-gradle:5.2.2.
Required by:
project : > org.ajoberstar.grgit:org.ajoberstar.grgit.gradle.plugin:5.2.2
> Dependency requires at least JVM runtime version 11. This build uses a Java 8 JVM.

* Try:
> Run this build using a Java 11 or newer JVM.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 793ms

please help, I got Java (build 1.8.0_431-b10)
 
As others have mentioned, you need at least Java 17 to build and run Mafia.

We are planning to bump that minimum version to Java 21 (the latest long-term support release) in the near future (next month or two, I'd guess), so it may make sense to get ahead of the curve. To the best of my knowledge, building the main jar with Java 21 has worked for a few months, and building other targets has worked for a few weeks.
 
Back
Top