way-zer / ScriptAgent4MindustryExt

A Plugin for Mindustry to load kotlin scripts && lots of feature scripts including vote/permission.
92 stars 26 forks source link

jdk-17 启动出错 #18

Closed hyx3179 closed 3 years ago

hyx3179 commented 3 years ago

jdk版本

java version "17" 2021-09-14 LTS
Java(TM) SE Runtime Environment (build 17+35-LTS-2724)
Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)

启动日志

[2021-10-10 | 18:40:50 | 信息] [LibraryManager] Start load dependencies,please be patient
[2021-10-10 | 18:40:50 | 信息] [LibraryManager] Load kotlin-reflect-1.5.20.jar from local
[2021-10-10 | 18:40:50 | 信息] [LibraryManager] Load kotlin-stdlib-1.5.20.jar from local
[10-10-2021 18:40:50] [E] Failed to load mod file config/mods/ScriptAgent4Mindustry-2.9.jar. Skipping.
[10-10-2021 18:40:50] [E] java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
        at mindustry.mod.Mods.loadMod(Mods.java:806)
        at mindustry.mod.Mods.loadMod(Mods.java:708)
        at mindustry.mod.Mods.load(Mods.java:362)
        at mindustry.Vars.init(Vars.java:305)
        at mindustry.server.ServerLauncher.init(ServerLauncher.java:47)
        at arc.backend.headless.HeadlessApplication.mainLoop(HeadlessApplication.java:65)
        at arc.backend.headless.HeadlessApplication$1.run(HeadlessApplication.java:53)
Caused by: cf.wayzer.libraryManager.LibraryLoadException: load to ClassLoader fail:
        at cf.wayzer.libraryManager.LibraryManager.loadToClassLoader(LibraryManager.java:116)
        at cf.wayzer.scriptAgent.ScriptAgent.load(ScriptAgent.kt:33)
        at cf.wayzer.scriptAgent.ScriptAgent.load$default(ScriptAgent.kt:26)
        at cf.wayzer.ScriptAgent4Mindustry.<init>(ScriptAgent4Mindustry.kt:26)
        ... 12 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.net.URLClassLoader.addURL(java.net.URL) accessible: module java.base does not "opens java.net" to unnamed module @25578e2d
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
        at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
        at cf.wayzer.libraryManager.LibraryManager.loadToClassLoader(LibraryManager.java:111)
        ... 15 more

[10-10-2021 18:40:51] [I] Server loaded. Type 'help' for help.
way-zer commented 3 years ago

see #16