From 30f8390d44142523050ac767dfc347aa48833bda Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Sun, 30 Nov 2025 15:32:46 +0100 Subject: [PATCH] Potential fix for jdk.internal.misc package not found --- .../build.gradle.kts | 0 .../src/jdk/internal/misc/Unsafe.java | 30 +++++++++++++++++++ .../org/eclipse/openj9/criu/CRIUSupport.java | 0 .../eclipse/openj9/criu/JVMCRIUException.java | 0 SpigotCore/SpigotCore_Main/build.gradle.kts | 2 +- settings.gradle.kts | 2 +- 6 files changed, 32 insertions(+), 2 deletions(-) rename SpigotCore/{CRIUDummy => CompileDummy}/build.gradle.kts (100%) create mode 100644 SpigotCore/CompileDummy/src/jdk/internal/misc/Unsafe.java rename SpigotCore/{CRIUDummy => CompileDummy}/src/org/eclipse/openj9/criu/CRIUSupport.java (100%) rename SpigotCore/{CRIUDummy => CompileDummy}/src/org/eclipse/openj9/criu/JVMCRIUException.java (100%) diff --git a/SpigotCore/CRIUDummy/build.gradle.kts b/SpigotCore/CompileDummy/build.gradle.kts similarity index 100% rename from SpigotCore/CRIUDummy/build.gradle.kts rename to SpigotCore/CompileDummy/build.gradle.kts diff --git a/SpigotCore/CompileDummy/src/jdk/internal/misc/Unsafe.java b/SpigotCore/CompileDummy/src/jdk/internal/misc/Unsafe.java new file mode 100644 index 00000000..3d54a742 --- /dev/null +++ b/SpigotCore/CompileDummy/src/jdk/internal/misc/Unsafe.java @@ -0,0 +1,30 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2025 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package jdk.internal.misc; + +public class Unsafe { + + public static Unsafe getUnsafe() { + throw new UnsupportedOperationException(); + } + + public native Object allocateInstance(Class cls) + throws InstantiationException; +} diff --git a/SpigotCore/CRIUDummy/src/org/eclipse/openj9/criu/CRIUSupport.java b/SpigotCore/CompileDummy/src/org/eclipse/openj9/criu/CRIUSupport.java similarity index 100% rename from SpigotCore/CRIUDummy/src/org/eclipse/openj9/criu/CRIUSupport.java rename to SpigotCore/CompileDummy/src/org/eclipse/openj9/criu/CRIUSupport.java diff --git a/SpigotCore/CRIUDummy/src/org/eclipse/openj9/criu/JVMCRIUException.java b/SpigotCore/CompileDummy/src/org/eclipse/openj9/criu/JVMCRIUException.java similarity index 100% rename from SpigotCore/CRIUDummy/src/org/eclipse/openj9/criu/JVMCRIUException.java rename to SpigotCore/CompileDummy/src/org/eclipse/openj9/criu/JVMCRIUException.java diff --git a/SpigotCore/SpigotCore_Main/build.gradle.kts b/SpigotCore/SpigotCore_Main/build.gradle.kts index 85ff16cc..0735c9a9 100644 --- a/SpigotCore/SpigotCore_Main/build.gradle.kts +++ b/SpigotCore/SpigotCore_Main/build.gradle.kts @@ -30,7 +30,7 @@ dependencies { annotationProcessor(libs.classindex) compileOnly(project(":CommonCore", "default")) compileOnly(project(":CommandFramework", "default")) - compileOnly(project(":SpigotCore:CRIUDummy", "default")) + compileOnly(project(":SpigotCore:CompileDummy", "default")) compileOnly(libs.worldedit12) diff --git a/settings.gradle.kts b/settings.gradle.kts index fc08ed92..45ededc4 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -234,7 +234,7 @@ include( include( "SpigotCore", - "SpigotCore:CRIUDummy", + "SpigotCore:CompileDummy", "SpigotCore:SpigotCore_8", "SpigotCore:SpigotCore_9", "SpigotCore:SpigotCore_10",