GeezerVison is showing github.com — Pull Processing into Java 21 · Issue #879 · processing/processing4
Pull Processing into Java 21 #879DescriptionUpdate the Ant build system to switch to the latest temurin release.
Files that at least will have to be updated:
build/build.xml
.github/workflows
Activityhx2A commented on Dec 13, 2024 Can I have some insight into what you are thinking here? I realize it is valuable to keep up with new Java versions so people can learn about and use the new language features.
The most important thing for me is to know about when Processing core.jar will require Java 21 and not Java 17. Is this something that could happen in 2025? SableRaf commented on Dec 13, 2024 CollaboratorAuthor More actions Hey Jim! @hx2A. Thanks for your question! I think this is open to discussion. I remember a comment from @sampottinger saying we should upgrade to Java 21 sooner rather than later, but we have not set a date for this yet. Maybe @Stefterv will have more to share about this?
Edit: I just noticed we've set a tentative milestone for 4.3.5, which would put it somewhere in the first half of 2025. Still, there's probably room for discussion since (as far as I know) it's not a blocker for any other issues. Stefterv commented on Dec 14, 2024 Not much to share from my perspective other than that I like to stay up to date and not only update when we have to.
I've tried a bunch of times to upgrade to 21 and it has never seemed to cause any issues so far. So if you see any regressions or code changes we would need to make, I'm all ears yehiarasheed commented on Mar 13, 2025 Stefterv commented on Mar 13, 2025 Currently the preprocessor (which is still partially build with ant) crashes on anything JDK >17 so we're locked at 17 till we fix that Reacted by Raphaël de Courville and Yehia Rasheed morfav commented on Apr 18, 2025 Hi @Stefterv
I tried running the project on JDK21. As you mentioned, it crashes when running ant-preproc.
The puzzling thing is that the ant java antlr task which it claims to be crashing on completes successfully on either JDK when run from the command line.
Even if you remove the generation part and just leave
<target name="preproc" description="Compile ANTLR 4 grammar">
<java classname="org.antlr.v4.Tool"
failonerror="true">
<classpath path="${antlr_jar}" />
</java>
</target>
gradle still crashes on JDK21. Feels like it's more of a gradle - ant interfacing issue rather than genuine antlr failure.
So it should be possible to at least move this part to the gradle script. Something along the lines of (I am not proficient with gradle but this seems to work on JDK21):
tasks.register<JavaExec>("ant-preproc") {
group = "build"
description = "Compile ANTLR 4 grammar"
classpath = files("${projectDir}/../mode/antlr-4.7.2-complete.jar")
mainClass.set("org.antlr.v4.Tool")
args(
"-o", "${projectDir}/../generated/processing/mode/java/preproc",
"-package", "processing.mode.java.preproc",
"${projectDir}/../src/processing/mode/java/preproc/Processing.g4"
)
isIgnoreExitValue = false
}
With this change and setting IntelliJ to a JDK21 SDK version I am able to get processing to run.
Please let me know if you'd like me to explore this further.
Thanks,
Vlad Stefterv commented on Apr 18, 2025 Hey Vlad! Thank you so much for your investigation on this! #957 addresses this issue by moving the whole setup into gradle and using the official Antlr plugin for Gradle Stefterv commented on Sep 8, 2025 I was looking into the existing Java/Kotlin LSP's again today and at least eclipse.jdt.ls needs Java 21 hx2A commented on Sep 8, 2025 Hi @Stefterv ! About how soon will Processing require Java 21? Stefterv commented on Sep 8, 2025 Hi @hx2A Currently no specific timeline yet, but as you can see we are running into things that are motivating the move hx2A commented on Sep 8, 2025 OK, great. Please keep me in the loop. When the Processing jars require Java 21, py5 will also require it. Current users will need to upgrade Java if they have Java 17 installed. Stefterv commented on Oct 20, 2025
MetadataMetadataStatusShow more project fields
DevelopmentNo branches or pull requestsIssue actions
|