Building processing throws `UnsupportedClassVersionError` in `:core:examples:Basic.main()`
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- java
- Bereich
- build-system
Rechercherichtung
Beginne mit BUILD.md und den Gradle-Dateien und reproduziere anschließend :core:examples:Basic.main() mit der gemeldeten JDK-17-Laufzeitumgebung. Verfolge, warum Basic als Klassendateiversion 65 kompiliert wird, während es auf einer Laufzeitumgebung ausgeführt wird, die nur Version 61 unterstützt; die Aufgabe ist erledigt, wenn der dokumentierte Build und die Ausführung des Beispiels ohne UnsupportedClassVersionError funktionieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I try to build processing with a clean clone of the repository.
Following the build instructions:
https://github.com/processing/processing4/blob/main/BUILD.md
1
The run button doesn't work in IntelliJ:
13:23:05: Executing ':core:examples:Basic.main()'…
Task :plugins:library:checkKotlinGradlePluginConfigurationErrors SKIPPED
Task :plugins:library:compileKotlin UP-TO-DATE
Task :plugins:library:compileJava NO-SOURCE
Task :plugins:library:pluginDescriptors UP-TO-DATE
Task :plugins:library:processResources UP-TO-DATE
Task :plugins:library:classes UP-TO-DATE
Task :plugins:library:jar UP-TO-DATE
Task :core:checkKotlinGradlePluginConfigurationErrors SKIPPED
Task :core:compileKotlin NO-SOURCETask :core:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.Task :core:processResources
Task :core:classes
Task :core:jarTask :core:examples:compileJava
Task :core:examples:processResources NO-SOURCE
Task :core:examples:classes
Note: /Users/doeke/Documents/processing4-w_branches/core/examples/src/main/java/Basic.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.Task :core:examples:Basic.main() FAILED
[Incubating] Problems report is available at: file:///Users/doeke/Documents/processing4-w_branches/.build/reports/problems/problems-report.html
9 actionable tasks: 5 executed, 4 up-to-date
Error: LinkageError occurred while loading main class Basic
java.lang.UnsupportedClassVersionError: Basic has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':core:examples:Basic.main()'.Process 'command '/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
- Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.BUILD FAILED in 2s
13:23:08: Execution finished ':core:examples:Basic.main()'.
Which is triggered by: Runtime.getRuntime().exec("echo Hello World");
If I comment out those lines then I get:
17:06:15: Executing ':core:examples:Basic.main()'…
Task :plugins:library:checkKotlinGradlePluginConfigurationErrors SKIPPED
Task :plugins:library:compileKotlin UP-TO-DATE
Task :plugins:library:compileJava NO-SOURCE
Task :plugins:library:pluginDescriptors UP-TO-DATE
Task :plugins:library:processResources UP-TO-DATE
Task :plugins:library:classes UP-TO-DATE
Task :plugins:library:jar UP-TO-DATE
Task :core:checkKotlinGradlePluginConfigurationErrors SKIPPED
Task :core:compileKotlin NO-SOURCE
Task :core:compileJava UP-TO-DATE
Task :core:processResources UP-TO-DATE
Task :core:classes UP-TO-DATE
Task :core:jar UP-TO-DATE
Task :core:examples:compileJava
Task :core:examples:processResources NO-SOURCE
Task :core:examples:classesTask :core:examples:Basic.main() FAILED
9 actionable tasks: 2 executed, 7 up-to-date
Error: LinkageError occurred while loading main class Basic
java.lang.UnsupportedClassVersionError: Basic has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':core:examples:Basic.main()'.Process 'command '/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
- Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.BUILD FAILED in 872ms
17:06:16: Execution finished ':core:examples:Basic.main()'.
And so on...
Also if I check the module settings in IntelliJ then they default to 21 for me.
Upon checking the gradle files I see nowhere something among the lines of:
languageVersion = JavaLanguageVersion.of(17)
It seems like whoever made processing move away from maven to gradle had only JDK 17 installed.
I don't want to dig deeper cause I simply don't have the time but it would be nice if some housekeeping would take place.
- Vorherrschende Sprache
- Java
- Sterne
- 497
- Forks
- 183
- Ø Merge
- 4 Std. 39 Min.
- Gemergte PRs (30 T.)
- 3
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus processing/processing4
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
processing/processing4#1554 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
processing/processing4#1515 · 1 Reaktion ·
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
processing/processing4#1573 ·
-
startup error Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
processing/processing4#1569 · 7 Kommentare ·
-
Binaries under bin directory lack executable permissions for the snap and .deb packages for Linux Offenbug
processing/processing4#1567 · 3 Kommentare · 1 Reaktion · 1 zugewiesene Person ·
Alle Issues in processing/processing4
Ähnliche Issues
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Offenarea/plugin
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
kestra-io/plugin-kestra#190 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
apache/rocketmq-dashboard#5064 ·
-
Consent portal: creating a duplicate Purpose shows a generic error instead of "already exists" Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
wso2/dpdp-accelerator#287 ·