From aa3d069cc9d304f1767eeaa84508b2b7a2822c43 Mon Sep 17 00:00:00 2001 From: comp500 Date: Thu, 2 Jul 2020 05:33:54 +0100 Subject: [PATCH] Report OpenJ9 as unsupported --- build.gradle | 2 +- gradle.properties | 2 +- src/main/java/link/infra/jumploader/Jumploader.java | 11 ++++++++++- src/main/resources/fabric.mod.json | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 18655af..c8fbbfa 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' -version = '1.0.10' +version = '1.0.11' group = 'link.infra.jumploader' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'jumploader' diff --git a/gradle.properties b/gradle.properties index 43d4f96..f677e6e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ modGroup=link.infra.jumploader -modVersion=1.0.10 +modVersion=1.0.11 modBaseName=jumploader diff --git a/src/main/java/link/infra/jumploader/Jumploader.java b/src/main/java/link/infra/jumploader/Jumploader.java index d658d52..782e085 100644 --- a/src/main/java/link/infra/jumploader/Jumploader.java +++ b/src/main/java/link/infra/jumploader/Jumploader.java @@ -35,7 +35,7 @@ import java.util.Set; public class Jumploader implements ITransformationService { - public static final String VERSION = "1.0.10"; + public static final String VERSION = "1.0.11"; public static final String USER_AGENT = "Jumploader/" + VERSION; private final Logger LOGGER = LogManager.getLogger(); @@ -67,6 +67,15 @@ private static T reflectField(Object destObj, String name) throws NoSuchFiel public void onLoad(@Nonnull IEnvironment env, @Nonnull Set set) { LOGGER.info("Jumploader " + VERSION + " initialising, discovering environment..."); + // OpenJ9 is currently unsupported - it does not allow bypassing the reflection blacklist to change the system classloader + // See FabricLoaderReflectionHack.java + if (System.getProperty("java.vm.name", "").toLowerCase().contains("openj9")) { + LOGGER.fatal("OpenJ9 is currently unsupported with Jumploader"); + LOGGER.fatal("Please use Hotspot, or install your desired modloader directly instead of jumploading it!"); + LOGGER.fatal("See https://fabricmc.net/wiki/install for a Fabric installation guide"); + System.exit(1); + } + // Get the game arguments ParsedArguments argsParsedTemp; // Very bad reflection, don't try this at home!! diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index e54f5c3..b75ac79 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "jumploader", - "version": "1.0.10", + "version": "1.0.11", "name": "Jumploader", "description": "Allows the use of Fabric mods in Twitch modpacks, by loading Fabric as if it were a Forge mod.",