r28000 - Enable building with Java 21. by @heeheehee-kolmaf

fronobulax

Developer
Staff member
This one refuses to do anything, not even an error. r27998 works though.

It agrees to do everything for me.

Could you perhaps elaborate? What were you trying to do, what did you do, what did you expect to happen and what happened instead?

If your basic problem is that the jar file doesn't "start" then your operating system and java version will be helpful to know.
 

Tombot

Member
Well I'm not entirely sure if this is accurate, but when I checked "about Java" it said "Version 8 update 411", I'm also using windows 10. I should also mention I usually start Kolmafia indirectly using an update EXE.
 

fronobulax

Developer
Staff member
Well I'm not entirely sure if this is accurate, but when I checked "about Java" it said "Version 8 update 411", I'm also using windows 10. I should also mention I usually start Kolmafia indirectly using an update EXE.

using "java -- version" from a command line (or shell prompt) should generate 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 your equivalent says Java 8 then you are almost certainly getting the expected behavior since KoLmafia requires v17.

I am concerned about "using an update EXE". Depending upon where it came from and what it does it may need to be rebuilt to use the correct version of Java. It should be mentioned that KoLmafia no longer is officially packaged in an EXE format. The supported way on Windows is to install the proper version of Java, download a jar file and then run the jar file.

So you are not doing things in the expected way. We can help you make adjustments but the failure of r28000 to "do anything" is almost certainly due to your environment.
 

Tombot

Member
Well as it turns out I was using an outdated version of Java, the highest it got was only JDK18. I was assuming that I was always being updated to the latest version of Java (via Java itself), but apparently not. Incidentally I am no longer able to load KOL mafia from my desktop directly anymore, instead I have to use a nested folder.
 
Last edited:

fronobulax

Developer
Staff member
Well as it turns out I was using an outdated version of Java, the highest it got was only JDK18. I was assuming that I was always being updated to the latest version of Java (via Java itself), but apparently not. Incidentally I am no longer able to load KOL mafia from my desktop directly anymore, instead I have to use a nested folder.
I think you are saying that you now have a version of Java greater than or equal to V17 so that should solve your problems.

KoLmafia needs to be able to write files to the folder than contains the jar file. Windows is very protective about files being written to the Desktop. So if you just place the jar file on the Desktop and try and run it will fail. The recommended work around is to place the jar file in a folder that the user (as defined by Windows) can read and write files. Documents is one such place and making Documents/KoLmafia and putting the jar there should work.

If you insist on having the jar and associated files on your Desktop you should be able to write there by running as a (Windows) Administrator.

If you want to launch KoLmafia from the Desktop you could write a batch file and place it, or a short cut that points to it, on the Desktop. The file should just change the directory to the one containing KoLmafia and then start it. We can help you write that if you need it.
 

Tombot

Member
Nah, it's fine. I just made a folder on my desktop and put the game files there instead. What I would like however is a new auto updater, all the ones I used to use no longer work. But for now it's easy enough just to occasionally check every now and again and manually download each update.
 

fewyn

Administrator
Staff member
Nah, it's fine. I just made a folder on my desktop and put the game files there instead. What I would like however is a new auto updater, all the ones I used to use no longer work. But for now it's easy enough just to occasionally check every now and again and manually download each update.

Here are some options:



I should write a post or something with links to some useful ones so people can find them.
 
Top