Repository navigation
Description
Most appropriate sub-area of Processing 4?
Export
Processing version
4.5.7
Operating system
macOS
Bug description
I am running macOS 27.0.1 on Applie silicon, and have just upgraded Processing to version 4.5.7. I now have problem generating apps from Processing sketches. Processing itself fails at JavaBuild.java:762 and prints a stack dump during app generation, and the produced app is not usable. I'll attach the dump below.
The same sketches run fine when run inside Processing and it no problem generating the apps from the very same (untouched) sketches with Processing 4.0.1.
If I untick "Include Java in the ..." the export works fine.
Also, if I attempt to generate an app (using version 4.5.7) for Linux everything seems to go fine (no dump).
Stack dump here:
java.util.NoSuchElementException: No value present
at java.base/java.util.Optional.orElseThrow(Unknown Source)
at processing.mode.java.JavaBuild.exportApplication(JavaBuild.java:762)
at processing.mode.java.JavaBuild.exportApplication(JavaBuild.java:606)
at processing.mode.java.JavaMode.handleExportApplication(JavaMode.java:184)
at processing.mode.java.JavaEditor.lambda$handleExportApplication$21(JavaEditor.java:491)
at processing.app.ui.ExportPrompt.trigger(ExportPrompt.java:345)
at processing.mode.java.JavaEditor.handleExportApplication(JavaEditor.java:500)
at processing.mode.java.JavaEditor.lambda$buildFileMenu$0(JavaEditor.java:223)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source)
at java.desktop/com.apple.laf.ScreenMenuItem.actionPerformed(Unknown Source)
at java.desktop/java.awt.MenuItem.processActionEvent(Unknown Source)
at java.desktop/java.awt.MenuItem.processEvent(Unknown Source)
at java.desktop/java.awt.MenuComponent.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.MenuComponent.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Steps to reproduce this
- Sketch in Processing 4.5.7 (ringning fine inside Processing)
- Select Export, macOS (Apple Silicon)
- Tick "Include Java in the..."
- Selected "Export"
snippet
No response
Additional context
No response
Would you like to work on the issue?
No, I’m just reporting the issue
Activity
chaitanya-bhardwaj commentedon Oct 7, 2026
I tracked down where this fails.
In
JavaBuild.javaexporting for macOS with embedded Java looks for the bundled JDK incompose.application.resources.dir:The filter expects the folder name to start with "jdk-". In the Gradle build (
app/build.gradle.kts), the bundled JDK is placed incomposeResources("jdk"), so the directory is named "jdk". Because it does not start with "jdk-",findFirst()is empty andorElseThrow()throwsNoSuchElementException.We can update the filter in
JavaBuild.javato accept "jdk" as well as "jdk-", matching howPlatform.getJavaHome()resolves it, and show a clear error message if the directory is missing.does this approach look ok?
SableRaf commentedon Oct 7, 2026
This looks like a duplicate of #1141, so I’ll close this to keep the discussion in one place. Please continue the discussion there.
@Chaitanya-970, check out those issues first. #1141 identified the same
jdk-/jdkmismatch, but it looks like the issue goes deeper. #1354 also has some investigation into where the regression was introduced.JRExLoadFullError#1141chaitanya-bhardwaj commentedon Oct 7, 2026
noted @SableRaf