Repository navigation
Fix REG_APP_DIR to support jpackage application launchers - #1528
tutimura-kg wants to merge 3 commits into
Conversation
|
The launcher executable created with jpackage continues to run as a process, so we can easily obtain the executable using |
|
Thanks @tutimura-kg. I am currently doing some fixes to the build system so we can commence releases again. Will review your work after that. |
|
@tutimura-kg okie! the build system is fixed. i will review soon :) |
|
Since this PR fixes a bug in Processing 4, I noticed that the repository guidelines recommend targeting |

Description
This PR fixes an issue where the file association fails when Processing is packaged and launched using
jpackage.Currently,
REG_APP_DIRrelies directly onSystem.getProperty("user.dir"). However, when launched via ajpackagegenerated launcher,user.dirpoints to the directory from which the application was invoked (e.g., the current terminal directory or shortcut location), rather than the actual installation directory ofprocessing.exe. This causes incorrect registry paths to be registered incheckAssociations().Thus, launching via file association breaks the next launch via file association. And launching via shortcut fixes the file association. This has not surfaced as a major issue on Windows 11 because the File Manager can override registry-defined associations. However, it remains a hidden bug that this PR aims to fix.
Changes
REG_APP_DIRto dynamically resolve the installation directory based on the location of the JAR file (viaWindowsPlatform.class).user.dirbehavior in caseprocessing.execannot be found relative to the JAR location.This ensures that file associations (
.pde, etc.) always register the correct absolute path ofprocessing.exe, regardless of the working directory at launch.