diff --git a/build.gradle b/build.gradle
index 33165385d93..23dcfc5dd7b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -50,10 +50,6 @@ modularity.patchModule("test", "fastparse_2.12-1.0.0.jar")
modularity.patchModule("test2", "fastparse-utils_2.12-1.0.0.jar")
modularity.patchModule("test3", "sourcecode_2.12-0.1.4.jar")
-// These are the Java version requirements we will check on each start of JabRef
-ext.minRequiredJavaVersion = "1.8.0_171"
-ext.allowJava9 = true
-
sourceSets {
main {
java {
@@ -271,10 +267,7 @@ processResources {
"azureInstrumentationKey": System.getenv('AzureInstrumentationKey'),
"springerNatureAPIKey": System.getenv('SpringerNatureAPIKey'),
"astrophysicsDataSystemAPIKey": System.getenv('AstrophysicsDataSystemAPIKey'),
- "ieeeAPIKey": System.getenv('IEEEAPIKey'),
- "minRequiredJavaVersion": minRequiredJavaVersion,
- "allowJava9": allowJava9
-
+ "ieeeAPIKey": System.getenv('IEEEAPIKey')
)
filteringCharset = 'UTF-8'
}
diff --git a/src/main/java/org/jabref/gui/JabRefMain.java b/src/main/java/org/jabref/gui/JabRefMain.java
index 0afc8d7f720..ae0a6acbf96 100644
--- a/src/main/java/org/jabref/gui/JabRefMain.java
+++ b/src/main/java/org/jabref/gui/JabRefMain.java
@@ -4,7 +4,6 @@
import javafx.application.Application;
import javafx.application.Platform;
-import javafx.scene.control.Alert;
import javafx.stage.Stage;
import org.jabref.cli.ArgumentProcessor;
@@ -19,8 +18,6 @@
import org.jabref.logic.protectedterms.ProtectedTermsLoader;
import org.jabref.logic.remote.RemotePreferences;
import org.jabref.logic.remote.client.RemoteClient;
-import org.jabref.logic.util.BuildInfo;
-import org.jabref.logic.util.JavaVersion;
import org.jabref.logic.util.OS;
import org.jabref.migrations.PreferencesMigrations;
import org.jabref.model.database.BibDatabaseMode;
@@ -48,8 +45,6 @@ public static void main(String[] args) {
@Override
public void start(Stage mainStage) {
try {
- // Fail on unsupported Java versions
- ensureCorrectJavaVersion();
FallbackExceptionHandler.installExceptionHandler();
// Init preferences
@@ -93,51 +88,6 @@ public void stop() {
Globals.shutdownThreadPools();
}
- /**
- * Tests if we are running an acceptable Java and terminates JabRef when we are sure the version is not supported.
- * This test uses the requirements for the Java version as specified in gradle.build
. It is possible to
- * define a minimum version including the built number and to indicate whether Java 9 can be used (which it currently
- * can't). It tries to compare this version number to the version of the currently running JVM. The check is
- * optimistic and will rather return true even if we could not exactly determine the version.
- *
- * Note: Users with a very old version like 1.6 will not profit from this since class versions are incompatible and
- * JabRef won't even start. Currently, JabRef won't start with Java 9 either, but the warning that it cannot be used
- * with this version is helpful anyway to prevent users to update from an old 1.8 directly to version 9. Additionally,
- * we soon might have a JabRef that does start with Java 9 but is not perfectly compatible. Therefore, we should leave
- * the Java 9 check alive.
- */
- private static void ensureCorrectJavaVersion() {
- // Check if we are running an acceptable version of Java
- final BuildInfo buildInfo = Globals.BUILD_INFO;
- JavaVersion checker = new JavaVersion();
- final boolean java9Fail = !buildInfo.allowJava9 && checker.isJava9();
- final boolean versionFail = !checker.isAtLeast(buildInfo.minRequiredJavaVersion);
-
- if (java9Fail || versionFail) {
- StringBuilder versionError = new StringBuilder(
- Localization.lang("Your current Java version (%0) is not supported. Please install version %1 or higher.",
- checker.getJavaVersion(),
- buildInfo.minRequiredJavaVersion));
-
- versionError.append("\n");
- versionError.append(Localization.lang("Your Java Runtime Environment is located at %0.", checker.getJavaInstallationDirectory()));
-
- if (!buildInfo.allowJava9) {
- versionError.append("\n");
- versionError.append(Localization.lang("Note that currently, JabRef does not run with Java 9."));
- }
-
- FXDialog alert = new FXDialog(Alert.AlertType.ERROR, Localization.lang("Error"), true);
- alert.setHeaderText(null);
- alert.setContentText(versionError.toString());
-
- // We exit on Java 9 error since this will definitely not work
- if (java9Fail) {
- System.exit(0);
- }
- }
- }
-
private static boolean handleMultipleAppInstances(String[] args) {
RemotePreferences remotePreferences = Globals.prefs.getRemotePreferences();
if (remotePreferences.useRemoteServer()) {
diff --git a/src/main/java/org/jabref/logic/l10n/Localization.java b/src/main/java/org/jabref/logic/l10n/Localization.java
index ba352b7239b..dcc612a9e20 100644
--- a/src/main/java/org/jabref/logic/l10n/Localization.java
+++ b/src/main/java/org/jabref/logic/l10n/Localization.java
@@ -51,7 +51,7 @@ private Localization() {
public static String lang(String key, String... params) {
if (localizedMessages == null) {
// I'm logging this because it should never happen
- LOGGER.error("Messages are not initialized before accessing key: " + key);
+ LOGGER.error("Messages are not initialized before accessing key: {}", key);
setLanguage(Language.ENGLISH);
}
return lookup(localizedMessages, key, params);
@@ -67,7 +67,7 @@ public static void setLanguage(Language language) {
Optional