GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [cli] Designer: Fix quotes in PMD_OPENJFX_MODULE_PATH setting by acanda · Pull Request #6741 · pmd/pmd

Conversation

@acanda

@acanda acanda commented May 31, 2026

Copy link
Copy Markdown
Contributor

Describe the PR

If JAVAFX_HOME contains a path with spaces, e.g. C:\Program Files\Java\javafx-sdk-21.0.2, the command .\pmd.bat designer would fail to start the designer with the error message java.lang.ClassNotFoundException: Files\Java\javafx-sdk-21.0.2.lib.

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@acanda
Fix quotes in PMD_OPENJFX_MODULE_PATH setting
c941b7f
If JAVAFX_HOME contains a path with spaces, e.g. `C:\Program Files\Java\javafx-sdk-21.0.2`, the command `.\pmd.bat designer` would fail to start the designer with the error message `java.lang.ClassNotFoundException: Files\Java\javafx-sdk-21.0.2.lib`.
@pmd-actions-helper

pmd-actions-helper Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

Documentation Preview

Compared to main:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
There are 0 changed duplications, 0 new duplications and 0 removed duplications.
There are 0 changed CPD errors, 0 new CPD errors and 0 removed CPD errors.

Regression Tester Report

(comment created at 2026-05-31 20:57:09+00:00 for c941b7f)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

UncleOwen
UncleOwen reviewed Jun 1, 2026
View reviewed changes
Comment thread pmd-dist/src/main/resources/scripts/pmd.bat
)

SET "PMD_OPENJFX_MODULE_PATH=--module-path %JAVAFX_HOME%/lib --add-modules javafx.controls,javafx.fxml"
SET "PMD_OPENJFX_MODULE_PATH=--module-path "%JAVAFX_HOME%/lib" --add-modules javafx.controls,javafx.fxml"

@UncleOwen UncleOwen Jun 1, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a Windows machine available to check, but don't you need to escape those?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@acanda acanda Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might think so, but you'd be wrong :-).

SET only allows a handful of special characters to be escaped and the quotes are not one of them. Something like ^"%JAVAFX_HOME%^" won't work (the ^ is the escape character).

The documentation of SET states that the quotes on the right-hand side of the = become part of the variable's value.

I don't know much about Windows batch scripts or their quoting logic but "%JAVAFX_HOME%/lib" is the only way I could find to make it work, and all the examples I found use the same 'quotes inside quotes' notation.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

UncleOwen reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@adangel adangel Jun 2, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is probably correct. On https://ss64.com/nt/set.html (section "Values with Spaces - using Double Quotes") there are some more examples.

Since we have both the module path and the --add-modules parameter here, we can't add the quotes later on in line 31 (as we do for CLASSPATH).

Note, that the bash version works a little bit different here, add the --add-modules parameter later (

pmd/pmd-dist/src/main/resources/scripts/pmd

Line 255 in 8a740a4

${PMD_OPENJFX_MODULE_PATH:+--module-path "$PMD_OPENJFX_MODULE_PATH" --add-modules javafx.controls,javafx.fxml} \
)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adangel adangel changed the title [designer] Fix quotes in PMD_OPENJFX_MODULE_PATH setting [cli] Designer: Fix quotes in PMD_OPENJFX_MODULE_PATH setting Jun 2, 2026
@adangel adangel added the a:bug PMD crashes or fails to analyse a file. label Jun 18, 2026
adangel
adangel approved these changes Jun 18, 2026
View reviewed changes

@adangel adangel left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

I've tested it under Windows and it works as expected.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adangel adangel added this to the 7.26.0 milestone Jun 18, 2026
adangel added a commit that referenced this pull request Jun 18, 2026
@adangel
[doc] Update release notes (#6741)
b7a67bc
adangel added a commit that referenced this pull request Jun 18, 2026
@adangel
[cli] Designer: Fix quotes in PMD_OPENJFX_MODULE_PATH setting (#6741)
e592eea
@adangel
adangel merged commit c4f1dbc into pmd:main Jun 18, 2026
11 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@UncleOwen UncleOwen UncleOwen left review comments
@adangel adangel adangel approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

a:bug PMD crashes or fails to analyse a file.

Projects

None yet

Milestone

7.26.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@acanda @adangel @UncleOwen
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.