Page 1 of 1

Trying to Make the Jar File Run on Arch Linux

Posted: Mon Jan 08, 2024 4:41 pm
by psygo
I'm trying to run the `jar` file through the following command (I've also tried within the same directory):

Code: Select all

java -jar gowrite2_3_2_3/GOWrite.jar
However, what I get back is this:

Code: Select all

240108 110409.377 net.gowrite.sgf.SGFUtil log INFO: start 21 / 3.2.3 in Linux/6.6.9-arch1-1
240108 110409.412 net.gowrite.sgf.SGFUtil log WARNING: debug31.cfgx settings not found.
240108 110409.434 net.gowrite.sgf.SGFUtil log INFO: Setting file "gowrite30.cfg" not present
240108 110409.814 net.gowrite.sgf.SGFUtil log SEVERE: Exception occured in main startup.
java.lang.reflect.InvocationTargetException
	at java.desktop/java.awt.EventQueue.invokeAndWait(Unknown Source)
	at java.desktop/java.awt.EventQueue.invokeAndWait(Unknown Source)
	at java.desktop/javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
	at gowrite.gui.Loader.start(Loader.java:246)
	at gowrite.gui.Loader.main(Loader.java:355)
	at GOWrite2.main(GOWrite2.java:327)
Caused by: java.awt.HeadlessException: 
No X11 DISPLAY variable was set,
or no headful library support was found,
but this program performed an operation which requires it,

	at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(Unknown Source)
	at java.desktop/java.awt.Window.<init>(Unknown Source)
	at java.desktop/java.awt.Frame.<init>(Unknown Source)
	at java.desktop/java.awt.Frame.<init>(Unknown Source)
	at gowrite.gui.Loader$1.run(Loader.java:259)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
240108 110409.816 net.gowrite.sgf.SGFUtil log SEVERE: Uncaught exception in main
java.awt.HeadlessException: 
No X11 DISPLAY variable was set,
or no headful library support was found,
but this program performed an operation which requires it,

	at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(Unknown Source)
	at java.desktop/java.awt.Window.<init>(Unknown Source)
	at java.desktop/java.awt.Frame.<init>(Unknown Source)
	at java.desktop/java.awt.Frame.<init>(Unknown Source)
	at gowrite.gui.Loader.start(Loader.java:335)
	at gowrite.gui.Loader.main(Loader.java:355)
	at GOWrite2.main(GOWrite2.java:327)
Here is my Java version (`java --version`):

Code: Select all

openjdk 21 2023-09-19
OpenJDK Runtime Environment (build 21+35)
OpenJDK 64-Bit Server VM (build 21+35, mixed mode, sharing)
Does anyone know what's going on? Any ideas of a possible solution?

Re: Trying to Make the Jar File Run on Arch Linux

Posted: Mon Jan 08, 2024 5:20 pm
by lpaatero
In the error log:
Caused by: java.awt.HeadlessException:
No X11 DISPLAY variable was set,
or no headful library support was found,
but this program performed an operation which requires it,
This indicates that you might have only the -headless java package installed (such as openjdk-21-jre-headless). This is good for many server use-cases, but GOWrite needs "full" jre (for swing support).

regards
Lauri

Re: Trying to Make the Jar File Run on Arch Linux

Posted: Mon Jan 08, 2024 10:31 pm
by psygo
You were 100% correct! Thanks, Lauri!

Doing a:

Code: Select all

pacman -Syu jdk-openjdk
And replacing the headless version with the full one did the trick.