PaperMC / paperweight

Gradle build system plugin for Paper and Paper forks
239 stars 47 forks source link

java conflict? #261

Closed IPECTER closed 2 weeks ago

IPECTER commented 2 weeks ago
Command: /Users/dev/Library/Java/JavaVirtualMachines/temurin-17.0.13/Contents/Home/bin/java -Xmx1G -classpath /Users/ipecter/.gradle/caches/modules-2/files-2.1/net.fabricmc/tiny-remapper/0.8.2/551cd73d063740ad4f1b54a5e33ece5e00b08fef/tiny-remapper-0.8.2-fat.jar net.fabricmc.tinyremapper.Main /Users/dev/Idea/Test/1_18_R2/build/libs/1_18_R2-dev-all.jar /Users/dev/Idea/Test/1_18_R2/build/libs/1_18_R2-unspecified.jar /Users/ipecter/.gradle/caches/paperweight-userdev/128db0cb1959ad40513457d8f14ffc91832522bc7ab073f6a72849ab672f7142/module/io.papermc.paper/dev-bundle/1.18.2-R0.1-SNAPSHOT/paperweight/setupCache/extractDevBundle.dir/data/mojang+yarn-spigot-reobf.tiny mojang+yarn spigot /Users/ipecter/.gradle/caches/paperweight-userdev/128db0cb1959ad40513457d8f14ffc91832522bc7ab073f6a72849ab672f7142/module/io.papermc.paper/dev-bundle/1.18.2-R0.1-SNAPSHOT/paperweight/setupCache/applyMojangMappedPaperclipPatch.jar --threads=1
Exception in thread "main" java.util.concurrent.CompletionException: java.lang.RuntimeException: error analyzing /META-INF/versions/21/org/bouncycastle/pqc/jcajce/provider/ntruprime/SNTRUPrimeKEMSpi.class from /Users/dev/Idea/Test/1_18_R2/build/libs/1_18_R2-dev-all.jar
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.RuntimeException: error analyzing /META-INF/versions/21/org/bouncycastle/pqc/jcajce/provider/ntruprime/SNTRUPrimeKEMSpi.class from /Users/dev/Idea/Test/1_18_R2/build/libs/1_18_R2-dev-all.jar
    at net.fabricmc.tinyremapper.TinyRemapper.analyze(TinyRemapper.java:576)
    at net.fabricmc.tinyremapper.TinyRemapper.access$400(TinyRemapper.java:73)
    at net.fabricmc.tinyremapper.TinyRemapper$2.visitFile(TinyRemapper.java:525)
    at net.fabricmc.tinyremapper.TinyRemapper$2.visitFile(TinyRemapper.java:521)
    at java.base/java.nio.file.Files.walkFileTree(Files.java:2811)
    at java.base/java.nio.file.Files.walkFileTree(Files.java:2882)
    at net.fabricmc.tinyremapper.TinyRemapper.readFile(TinyRemapper.java:521)
    at net.fabricmc.tinyremapper.TinyRemapper.access$200(TinyRemapper.java:73)
    at net.fabricmc.tinyremapper.TinyRemapper$1$1.get(TinyRemapper.java:492)
    at net.fabricmc.tinyremapper.TinyRemapper$1$1.get(TinyRemapper.java:488)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
    ... 3 more
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 65
    at org.objectweb.asm.ClassReader.<init>(ClassReader.java:199)
    at org.objectweb.asm.ClassReader.<init>(ClassReader.java:180)
    at org.objectweb.asm.ClassReader.<init>(ClassReader.java:166)
    at net.fabricmc.tinyremapper.TinyRemapper.analyze(TinyRemapper.java:574)
    ... 13 more

gradle and intelliJ project setting is Java 17. everything is java17 MacOS JavaHome is Java 21

first line shows intelliJ/gralde project setting java. but paperweight not use gradle java(toolchain).... It use JAVA_HOME.. shit.

electronicboy commented 2 weeks ago

You need to be using a version of tinymapper that supports the classes that are being fed to it, this can be configured inside of the gradle project using paperweight (see the build help pins on the discord)