Getting Mafia Started: Help Please

Hi there, I'm HQD. I'm a player from 2009-2012 who's jumping back in and is excited to learn and relearn the game. I'm hoping to get Mafia up and running but am having trouble. Read on for chaos and confusion.

I followed various sources to https://github.com/kolmafia/kolmafia/releases and downloaded KoLmafia-r26310.jar and KoLmafia-r26310-22.03.26310.exe, and have not had success with either of them.

If I double-click the desktop shortcut that has appeared, I get a window titled "KoLmafia-r26310.exe" which says "Failed to launch JVM." If I press OK, a new window pops up with the same title but saying "Child process exited with code 1." This also occurs if I go to Program Files, KoLmafia-r26310, and double-click the .exe file from there.

If I go to program files, KoLmafia-r26310, app, and open the jar from there, I get a different problem. If I double-click, a window flashes into existence and disappears in an instant and nothing further happens. It's too fast for me to read it. If I right-click on the jar file and go to Open With, I have four options:

Java(TM) Platform SE Binary
Java(TM) Web Start Launcher
OpenJDK Platform Binary
Choose another app

If I choose option 1, Platform SE Binary, I get a Java Virtual Machine Launcher popup that says "Error: A JNI error has occurred, please check your installation and try again". I press OK and it disappears.

If I choose Web Start Launcher, I get an Application Error popup that says "Unable to launch the application." If I click on the details button, I get a wall of text headed by "Error: Could not load file/URL specified: C:\Program Files\KoLmafia-r26310\app\KoLmafia-26310.jar," underneath which I'm able to pick out "Caused by: java.io.IOException: File too large" and a bunch of other stuff.

If I choose OpenJDK Platform Binary, nothing happens. Nothing.

If I choose Choose another app, it gives me the same options again or lets me search my PC or the Microsoft store for an app. If I search my computer, go to the Java folder, then jre1.8.0_321, I get three more folders, bin, legal, and lib.

legal and lib have a bunch of empty folders.

bin has some empty folders and a slew of applications, some of which look like the ones listed above. I'm not gonna list them all cause this has already gone on way too long, but I don't see an obvious "Java.exe" or anything like that. Some say Java, but when I mouse over them they say the same as the four options above (SE binary, OpenJDK Platform Binary, etc.).

I've uninstalled and reinstalled both Java and KoLmafia-26310 twice. Not sure what my next step is. If I go to command prompt and type in java -version, I get the following:

java version "1.8.0_321"
Java(TM) SE Runtime Environment (build 1.8.0_321-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.321-b07, mixed mode)

Many thanks for reading and for any help. I'm sure this is a problem with my PC or something I did wrong, I'm just much too technically illiterate to know what or where. Happy to provide more information as needed and requested.

-HQD
 

fewyn

Administrator
Staff member
Uninstall any Java versions you currently have on your computer and then install 17 from https://adoptium.net/index.html

It looks like you still have an older version installed that's causing all kinds of problems so this should probably resolve it.
 
Hi fewyn, thanks for your quick response. I've uninstalled the previous Java and installed 17 from that link. No idea how I got that old one. My java -version is now:

openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)

Unfortunately this hasn't fixed the problem. The only other change is that instead of four options under Open With, I now see only one: OpenJDK Platform Binary, which still does nothing.

Trying to launch the .exe file still results in the window titled "KoLmafia-r26310.exe" which says "Failed to launch JVM," followed by the window saying "Child process exited with code 1."
 
If I click the KoLmafia-26310.jar link, it downloads at the bottom of my chrome browser, but if I left-click it, nothing happens. If I click the arrow, it only has an "Open when done" option. No Open or Open With. Again, nothing happens when I click it.

1647949353378.png
 
It shows up in my downloads folder. If I right click it, I can click Open, which creates the flash of a window I described initially, but doesn't do anything else. I can also choose Open With.
 

heeheehee

Developer
Staff member
Right, I'm not sure exactly what you're supposed to select in the Open With dialog (presumably the new version of Java you install; I just don't know what it'll show up as). There's probably something wonky with the file association the first time around.
 
1647951146875.pngOne of these? I've tried the two with the different picture--java and javaw. The first one does the same window-flash that happens when I try to open the file normally. javaw does nothing.
 
Somehow Jarfix isn't detecting a Java Runtime Environment, even though my java -version in command prompt says:

openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)
 

fronobulax

Developer
Staff member
Hi there. Still looking for some help getting Mafia started. Thank you for your time and assistance thus far. I really appreciate it.

Sorry.

Try the following. if you don't understand what I am asking then please ask again. I'm not always clear.

Open a Command Prompt.

Change the current directory (for the command prompt) to the directory where the KoLmafia jar is located.

On my system that would be "cd C:\Dropbox\dist'

Type the command "java -version"

Hopefully you will see something similar to

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)

Now type
"java -jar KoLmafia-26313.jar"

using the name of the jar file you are trying to run.

I am expecting one of several things to happen:
  • mafia starts up and things behave as expected.
  • mafia fails to start up and generates a Windows dump.
  • mafia fails to start up and there is some text printed to the command prompt (which you should capture and report)
  • mafia fails to start up and a file named something like DEBUG_20220314.txt is created (which you should share)
If my expectations are wrong then tell us what did happen.
 
Hi fronobulax. Thanks so much for getting back to me. I believe I understand what you've told me to do; if I've misunderstood, please let me know and I'll try again. Hopefully this'll help diagnose the problem.

After changing directory, my java -version is as follows:

C:\Program Files\KoLmafia-r26310\app>java -version
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)

I'm putting the output from attempting to run the .jar in a spoiler here since it goes on for a while:

C:\Program Files\KoLmafia-r26310\app>java -jar KoLmafia-26310.jar

KoLmafia r26310
Build main-e491620 17.0.2 (Eclipse Adoptium 17.0.2+8) Windows Server 2022 amd64 10.0

Currently Running on Windows 10
Local Directory is C:\Program Files\KoLmafia-r26310\app
Using Java 17.0.2

java.io.IOException: The system cannot find the path specified
at java.base/java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.base/java.io.File.createNewFile(File.java:1043)
at net.java.dev.spellcast.utilities.DataUtilities.getInputStream(DataUtilities.java:243)
at net.sourceforge.kolmafia.preferences.Preferences.loadPreferences(Preferences.java:588)
at net.sourceforge.kolmafia.preferences.Preferences.loadGlobalPreferences(Preferences.java:521)
at net.sourceforge.kolmafia.preferences.Preferences.<clinit>(Preferences.java:422)
at net.sourceforge.kolmafia.swingui.menu.PartialMRUList.update(PartialMRUList.java:124)
at net.sourceforge.kolmafia.swingui.menu.PartialMRUList.<init>(PartialMRUList.java:37)
at net.sourceforge.kolmafia.KoLConstants.<clinit>(KoLConstants.java:118)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:244)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\settings\GLOBAL_prefs.txt (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.preferences.Preferences.saveToFile(Preferences.java:1078)
at net.sourceforge.kolmafia.preferences.Preferences.setObject(Preferences.java:1027)
at net.sourceforge.kolmafia.preferences.Preferences.setString(Preferences.java:966)
at net.sourceforge.kolmafia.preferences.Preferences.setString(Preferences.java:747)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:432)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\settings\GLOBAL_prefs.txt (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.preferences.Preferences.saveToFile(Preferences.java:1078)
at net.sourceforge.kolmafia.preferences.Preferences.setObject(Preferences.java:1027)
at net.sourceforge.kolmafia.preferences.Preferences.setInteger(Preferences.java:980)
at net.sourceforge.kolmafia.preferences.Preferences.setInteger(Preferences.java:763)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:433)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\afterlife.1.ash (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\barrel_sounds.js (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\basement.js (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\basics.1.css (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\basics.js (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\chat.html (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\cli.html (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\combatfilter.1.js (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\hotkeys.js (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\ircm_extend.3.js (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\macrohelper.5.js (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\onfocus.1.js (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\sorttable.2.js (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\stationarybuttons.2.css (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\relay\stationarybuttons.2.js (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.utilities.FileUtilities.loadLibrary(FileUtilities.java:180)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:32)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
java.io.FileNotFoundException: C:\Program Files\KoLmafia-r26310\app\settings\GLOBAL_prefs.txt (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:385)
at net.java.dev.spellcast.utilities.DataUtilities.getOutputStream(DataUtilities.java:371)
at net.sourceforge.kolmafia.preferences.Preferences.saveToFile(Preferences.java:1078)
at net.sourceforge.kolmafia.preferences.Preferences.setObject(Preferences.java:1027)
at net.sourceforge.kolmafia.preferences.Preferences.setString(Preferences.java:966)
at net.sourceforge.kolmafia.preferences.Preferences.setString(Preferences.java:747)
at net.sourceforge.kolmafia.webui.RelayServer.<init>(RelayServer.java:35)
at net.sourceforge.kolmafia.webui.RelayServer.<clinit>(RelayServer.java:27)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:174)
at net.sourceforge.kolmafia.RequestLogger.printLine(RequestLogger.java:88)
at net.sourceforge.kolmafia.KoLmafia.checkDataOverrides(KoLmafia.java:439)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:267)
Exception in thread "main" java.lang.NullPointerException: Cannot read the array length because "<local3>" is null
at net.sourceforge.kolmafia.request.RelayRequest.clearImageDirectory(RelayRequest.java:603)
at net.sourceforge.kolmafia.request.RelayRequest.clearImageCache(RelayRequest.java:613)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:278)

C:\Program Files\KoLmafia-r26310\app>
 

Magus_Prime

Well-known member
Hello,

The first thing that occurs to me is to move the entire KoLmafia installation folder out of Program Files. Try moving to somewhere that makes sense in your user profile. Perhaps something like "C:\users\<username>\Documents\KoLmafia\" where <username> is replaced by your username on the system.
 

Ryo_Sangnoir

Developer
Staff member
I can reproduce exactly your error message by putting KoLMafia in a folder I don't have write permissions to.

So I agree with Magus that putting it inside your user directory will probably fix your issue.
 

fronobulax

Developer
Staff member
Yes. The error indicates a problem with file creation and access. mafia will give up if it can't find/create some files. Windows is very aggressive about protecting C:\Program Files. So your best be would be to create a directory, put Kolmafia in it and run from there. The alternative would be to always try and run KoLmafia as a Windows Administrator.

I note that I have seen a similar problem on my system when I tried to run KoLmafia from the desktop.

I think we have a fix.
 
Yessss, that did it!! I moved it to my user documents as Magus_Prime suggested and it asked for administrator permission to move it. Granted it and Mafia worked immediately. Yay! Not sure why it wrote to Program Files in the first place.

Thank you all so much! I really appreciate the extensive help, and particularly how careful you all were to phrase it in ways I could understand with my (very) limited technical knowledge. Is there somewhere I can donate to the project as a thank you?

I think we have a fix.

You do indeed. All wrapped up with a bow.
 
Top