Merge branch 'main' into renovate/major-jetty-packages

This commit is contained in:
Tobi Schäfer 2025-02-15 20:43:32 +01:00
commit cd8baa4ac1
Signed by: tobi
GPG key ID: 91FAE6FE2EBAC4C8
11 changed files with 90 additions and 65 deletions

View file

@ -18,7 +18,7 @@ ExecStart = /usr/bin/java -server \
-jar launcher.jar \
-w 8080 -x 8081
ExecReload = touch apps.properties && touch server.properties
ExecReload = /bin/sh -c 'touch apps.properties && touch server.properties'
ExecStop = /bin/kill -15 $MAINPID
[Install]

View file

@ -36,7 +36,7 @@ import helma.util.ResourceProperties;
*/
public class Server implements Runnable {
// version string
public static final String version = "🐜";
public static final String version = "__version__";
// build date
public static final String buildDate = "__builddate__";
@ -149,17 +149,13 @@ public class Server implements Runnable {
* check if we are running on a Java 2 VM - otherwise exit with an error message
*/
public static void checkJavaVersion() {
String javaVersion = System.getProperty("java.version");
String javaVersion = System.getProperty("java.version", "0");
int majorVersion = Integer.parseInt(javaVersion.split("\\.")[0]);
if ((javaVersion == null) || javaVersion.startsWith("1.5")
|| javaVersion.startsWith("1.4")
|| javaVersion.startsWith("1.3")
|| javaVersion.startsWith("1.2")
|| javaVersion.startsWith("1.1")
|| javaVersion.startsWith("1.0")) {
System.err.println("This version of Helma requires Java 1.6 or greater.");
if (majorVersion < 11) {
System.err.println("This version of Helma requires Java 11 or greater.");
if (javaVersion == null) { // don't think this will ever happen, but you never know
if (majorVersion == 0) { // don't think this will ever happen, but you never know
System.err.println("Your Java Runtime did not provide a version number. Please update to a more recent version.");
} else {
System.err.println("Your Java Runtime is version " + javaVersion +