Can't start GeoServer 3 bin-zip on Windows

I downloaded geoserver-main-latest-bin.zip dated 2025-11-04, unzipped on Windows, and tried to start the server but it fails. My JDK version is openjdk 21.0.8 2025-07-15 LTS. The error is

Error occurred during initialization of boot layer
java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: java.desktop specified more than once to --patch-module

The patch-module thing refers perhaps to the line #139 of the startup.bat
set MARLIN_ENABLER=--patch-module java.desktop="%MARLIN_JAR%"

Any suggestions about what to do?

-Jukka Rahkonen-

Hey @jratike80 thanks for checking a nightly build!’

Do you have the final command line generated? Maybe we could see how it is getting specified twice?

My understand is that Marlin is included in recent JDKs, so perhaps this is not needed for JDK21?

Checking website: GitHub - bourgesl/marlin-renderer: Marlin is the FAST Java2D antialiasing rasterizer derived from OpenJDK Pisces (shape)

Has a table showing:

Open JDK 17 [LTS] / Marlin-renderer 0.9.4.9 for JDK17+
Open JDK 21 [LTS] / Marlin-renderer 0.9.4.9 for JDK17+

Can you confirm we have the right version ?

Problem resolved, it was an user error.

For debugging purposes I opened a new command window for running startup.bat instead of double clicking the batch file in the file manager. Then I closed the program with Ctrl-C, but then I made an error by running startup.bat again from the same command window. Because of that the script was trying to add %MARLIN_ENABLER% for a second time into JAVA_OPTS on line 140
set JAVA_OPTS=%JAVA_OPTS% %MARLIN_ENABLER%

No problem now when running startup from a fresh command window each time, or by double clicking startup/shutdown in the file manager.

-Jukka-