You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GNU/Linux startup script compares jreMinVersion as text #505
On GNU/Linux, without a bundled JRE, the startup script compares the installed Java version with jreMinVersion as text, so it can reject a newer Java or accept an older one.
Where
linux/startup.sh.vtl, compareVersions() (line 41): [[ "${v1[$i]}" > "${v2[$i]}" ]] is a string comparison in Bash. Examples:
Java 17.0.9 with jreMinVersion8: "17" > "8" is false, so the app refuses to start with "The application requires a Java Runtime Environment 8 or higher".
Java 9 with jreMinVersion11: "9" > "11" is true, so it starts.
Possible fix
Compare numerically: (( 10#${v1[$i]} > 10#${v2[$i]} )) (and the same for <), handling 1.8-style versions (major 1 means the second component).
Workaround
Bundle a JRE, or don't set jreMinVersion for GNU/Linux.
Fixed in devel (29e3392): the startup script compares the versions numerically (the leading digits of each part, and 1.x as x), so Java 17 passes jreMinVersion 8 and Java 9 fails 11. The CI renders the script with jreMinVersion and checks 8 version pairs on every push (./gradlew checkTemplates).
It will ship in 2.0.1, and I'll close this issue then.
How to test 2.0.1-SNAPSHOT
Important
Since 2.0.0 the groupId, the Gradle plugin id and the Java packages are io.github.javapackager (see Upgrading to 2.0).
Maven, add the snapshots repository and use the snapshot version:
Activity
Fix the bugs found while documenting 2.0.0
Check the Velocity templates in CI
fvarrui commentedon Oct 11, 2026
Fixed in
devel(29e3392): the startup script compares the versions numerically (the leading digits of each part, and1.xasx), so Java 17 passesjreMinVersion8 and Java 9 fails 11. The CI renders the script withjreMinVersionand checks 8 version pairs on every push (./gradlew checkTemplates).It will ship in 2.0.1, and I'll close this issue then.
How to test
2.0.1-SNAPSHOTImportant
Since 2.0.0 the
groupId, the Gradle plugin id and the Java packages areio.github.javapackager(see Upgrading to 2.0).Maven, add the snapshots repository and use the snapshot version:
Gradle, add the snapshots repository in
settings.gradle:pluginManagement { repositories { maven { url = 'https://central.sonatype.com/repository/maven-snapshots/' } gradlePluginPortal() } }and use the snapshot version in
build.gradle:plugins { id 'io.github.javapackager' version '2.0.1-SNAPSHOT' }See Snapshot versions for more.