Skip to content

'gradlew run' cannot run sketch #1058

Closed

Description

@Junology

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

Activity

  1. Stefterv commented on Apr 23, 2025

    @Stefterv
    Member

    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

  2. Junology commented on Apr 23, 2025

    @Junology
    ContributorAuthor

    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'.
    
    
  3. Junology commented on Apr 23, 2025

    @Junology
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions