Skip to content

'gradlew run' cannot run sketch #1058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Junology opened this issue Apr 23, 2025 · 3 comments · Fixed by #1054
Closed

'gradlew run' cannot run sketch #1058

Junology opened this issue Apr 23, 2025 · 3 comments · Fixed by #1054
Labels
bug Something isn't working

Comments

@Junology
Copy link
Contributor

Most appropriate sub-area of Processing 4?

Build process

Processing version

commit hash ecd219b

Operating system

Linux (Ubuntu 20.04)

Steps to reproduce this

"1. Clone processing4 repo, and move to the project directory.

  1. ./gradlew run

  2. Hit the Run button, and get exception

java.io.IOException: Cannot run program "(...)/processing4/app/bin/java": error=2, No such file or directory

"

snippet

Additional context

After examining around processing.app.Platform.getJavaHome(), I realized that Processing cannot find java when the resource directory (app/build/compose/tmp/prepareAppResources in my case) does not contain it.
Is the directory supposed to contain a sort of JAVA_HOME for Processing, or should it just use system java as a fallback?

Would you like to work on the issue?

Yes

@Junology Junology added the bug Something isn't working label Apr 23, 2025
@Stefterv
Copy link
Collaborator

Stefterv commented Apr 23, 2025

Thanks for the heads up!

Could you check if you have the same issue with #1054 ? Otherwise we'll be fixing it and then breaking it again directly after 😅

EDIT: Tested it myself, main has the issue you're describing when running from the command line and on #1054 it works fine

@Junology
Copy link
Contributor Author

Thank you for your quick reply.
I tried the branch of #1054, and the build process (./gradlew run more precisely) failed with

> Task :app:includeJdk FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:includeJdk'.
> Couldn't follow symbolic link '/usr/lib/jvm/java-17-openjdk-amd64/lib/src.zip'.

@Junology
Copy link
Contributor Author

I just realized that /usr/lib/jvm/java-17-openjdk-amd64/lib/src.zip is indeed a symbolic link to ../../openjdk-17/src.zip which does not exist untill openjdk-17-source is installed (in Ubuntu).
After installing it, the build is completed.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants