Hey,
I'm trying to get KoLmafia to run for Crimbo again this year. Had to update Java from 8 to 17, that was easy enough. But now I'm getting the following error:
I don't really have any clue as to how to fix this.
I do run it in a docker, I'm sure that doesn't help, but I rather not unlease Java any further on my system than necessary. Previous years this was no issue at all (except ofc it can't open a browser for me, which is not a problem for me).
Dockerfile:
Makefile:
I'm well versed with docker but not so much with Java, so would appreciate any tips that you may have
I'm trying to get KoLmafia to run for Crimbo again this year. Had to update Java from 8 to 17, that was easy enough. But now I'm getting the following error:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
KoLmafia r26047, Linux, Java 17.0.1
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Please note: do not post this log in the KoLmafia thread of KoL's
Gameplay-Discussion forum. If you would like the KoLmafia dev team
to look at it, please write a bug report at kolmafia.us. Include
specific information about what you were doing when you made this
and include this log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Timestamp: Tue Dec 21 18:52:18 UTC 2021
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
User:
Current run: 0
MRU Script: Unknown
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
net.sourceforge.kolmafia.swingui.LoginFrame could not be loaded
class java.lang.UnsupportedOperationException: Desktop API is not supported on the current platform
java.lang.UnsupportedOperationException: Desktop API is not supported on the current platform
at java.desktop/java.awt.Desktop.getDesktop(Desktop.java:304)
at net.sourceforge.kolmafia.CreateFrameRunnable.addMenuItems(CreateFrameRunnable.java:261)
at net.sourceforge.kolmafia.CreateFrameRunnable.decorate(CreateFrameRunnable.java:251)
at net.sourceforge.kolmafia.CreateFrameRunnable.runConstruction(CreateFrameRunnable.java:229)
at net.sourceforge.kolmafia.CreateFrameRunnable.createFrame(CreateFrameRunnable.java:128)
at net.sourceforge.kolmafia.CreateFrameRunnable.run(CreateFrameRunnable.java:114)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
net.sourceforge.kolmafia.swingui.LoginFrame could not be loaded
I don't really have any clue as to how to fix this.
I do run it in a docker, I'm sure that doesn't help, but I rather not unlease Java any further on my system than necessary. Previous years this was no issue at all (except ofc it can't open a browser for me, which is not a problem for me).
Dockerfile:
FROM openjdk:17-buster
ARG KOL_VERSION
ADD https://ci.kolmafia.us/job/Kolmafia/lastSuccessfulBuild/artifact/dist/KoLmafia-${KOL_VERSION}.jar /KoLmafia-latest.jar
RUN apt-get update && apt-get -y install libxext6 libxrender1 libxtst6
CMD ["java", "-jar", "/KoLmafia-latest.jar"]
Makefile:
run:
xhost +
docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix${DISPLAY} -v $(shell pwd)/.kolmafia:/root/.kolmafia --rm --name k
olmafia kolmafia:latest
build:
test "${KOL_VERSION}" # Hint: make build KOL_VERSION=19xxx
docker build . -t kolmafia --build-arg KOL_VERSION=$(KOL_VERSION)
I'm well versed with docker but not so much with Java, so would appreciate any tips that you may have
Last edited by a moderator: