dragonwell-project / dragonwell8

Alibaba Dragonwell8 JDK
http://dragonwell-jdk.io
GNU General Public License v2.0
4.2k stars 496 forks source link

[Bug] 无法加载经过混淆后的jar #450

Closed 3328429240 closed 1 year ago

3328429240 commented 1 year ago

[17:50:08] [Server thread/INFO]: [MyPet] Enabling MyPet v1.0 [17:50:08] [Server thread/ERROR]: Error occurred while enabling MyPet v1.0 (Is it up to date?) java.lang.InternalError: Malformed class name at java.lang.Class.getSimpleName(Class.java:1330) ~[?:1.8.0_352] at java.lang.Class.isAnonymousClass(Class.java:1411) ~[?:1.8.0_352] at co.aikar.timings.SpigotTimings.getPluginTaskTimings(SpigotTimings.java:58) ~[%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.(CraftTask.java:42) ~[%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:135) ~[%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:122) ~[%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at cn.mypet.MyPet.onEnable(p:59) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at top.iseason.bukkit.model.PLoader.enablePlugin(PLoader.java:134) [%5B插件指定限制%5DPluginLimiter.jar:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:359) [%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:318) [%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:408) [%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:372) [%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:327) [%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:267) [%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [%5b2%5dPaperSpigot-1.8.8.jar:git-PaperSpigot-445] at java.lang.Thread.run(Thread.java:855) [?:1.8.0_352]

kuaiwei commented 1 year ago

在openjdk8上的表现一样吗?能提供重现的步骤吗?

3328429240 commented 1 year ago

在openjdk8上的表现一样吗?能提供重现的步骤吗?

我在使用openjdk8的时候加载并没出现这个问题 但在使用dragonwell8或其他优化类Java后便无法加载

混淆的jar是使用Allatori混淆后的(类名进行了高强度混淆) Obfuscation by Allatori Obfuscator http://www.allatori.com

kuaiwei commented 1 year ago

能上传混淆后的jar包吗?

3328429240 commented 1 year ago

能上传混淆后的jar包吗?

[公会]SuperFac.zip

sendaoYan commented 1 year ago

Error: Invalid or corrupt jarfile SuperFac.jar

image

3328429240 commented 1 year ago

Error: Invalid or corrupt jarfile SuperFac.jar

image

我使用的是MineCraft的Bukkit Server启动,是它显示的这个错误

sendaoYan commented 1 year ago

Error: Invalid or corrupt jarfile SuperFac.jar image

我使用的是MineCraft的Bukkit Server启动,是它显示的这个错误

上游的temurin jdk8 也无法解析这个jar文件。可能是这个jar文件本身有问题

image

3328429240 commented 1 year ago

Error: Invalid or corrupt jarfile SuperFac.jar image

我使用的是MineCraft的Bukkit Server启动,是它显示的这个错误

上游的temurin jdk8 也无法解析这个jar文件。可能是这个jar文件本身有问题

image

你尝试一下使用https://papermc.io(Minecraft server核心)然后放入plugins文件夹,它会显示无法启动 但是其他未加密的插件可以启动,原版的Java JDK就没这个问题

sendaoYan commented 1 year ago

Error: Invalid or corrupt jarfile SuperFac.jar image

我使用的是MineCraft的Bukkit Server启动,是它显示的这个错误

上游的temurin jdk8 也无法解析这个jar文件。可能是这个jar文件本身有问题 image

你尝试一下使用https://papermc.io(Minecraft server核心)然后放入plugins文件夹,它会显示无法启动 但是其他未加密的插件可以启动,原版的Java JDK就没这个问题

[16:55:16 ERROR]: Could not load 'plugins/SuperFac.jar' in folder 'plugins' org.bukkit.plugin.UnknownDependencyException: Unknown/missing dependency plugins: [Vault]. Please download and install these plugins to run 'SuperFac'.

image

sendaoYan commented 1 year ago

加载Vault插件之后,使用temurin jdk17版本启动报错java.lang.NoClassDefFoundError: com/comphenix/protocol/events/PacketListener

image

3328429240 commented 1 year ago

加载Vault插件之后,使用temurin jdk17版本启动报错java.lang.NoClassDefFoundError: com/comphenix/protocol/events/PacketListener

image 新建文件夹.zip

再放入ProtocolLib插件,我的测试环境是paper1.8.8和jdk8

测试命令:

~/software/jdk/temirun/jdk8u352-b08/bin/java -jar paper-1.8.8-445.jar

jdk版本(上游的temurin jdk8):

openjdk version "1.8.0_352"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_352-b08)
OpenJDK 64-Bit Server VM (Temurin)(build 25.352-b08, mixed mode)

报错: java.lang.InternalError: Malformed class name

image

jdk下载链接:https://github.com/adoptium/temurin8-binaries/releases

sendaoYan commented 1 year ago

这个问题,使用上游的temurin jdk8一样的报错 @3328429240

3328429240 commented 1 year ago

这个问题,使用上游的temurin jdk8一样的报错 @3328429240

好吧,只能先这样了