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 — [core] designer.bat errors when JAVAFX_HOME contains spaces · Issue #3328 · pmd/pmd

[core] designer.bat errors when JAVAFX_HOME contains spaces #3328

New issue
Copy link
New issue
Copy link
Closed
#3726
Closed
[core] designer.bat errors when JAVAFX_HOME contains spaces#3328
#3726
Copy link
Assignees
adangel
Labels
a:bugPMD crashes or fails to analyse a file.in:cliAffects the PMD Command Line Interface
Milestone
6.42.0

Description

@zzzzfeng
zzzzfeng
opened on Jun 9, 2021
Issue body actions

Affects PMD Version:

version 6.35.0
Windows

Description:

error code:
[%JAVAFX_HOME%] EQU []

runtime error:
if [C:\Program Files\javafx-sdk-11.0.2\] EQU [] (
此时不应有 Files\javafx-sdk-11.0.2\]。

fix:
["%JAVAFX_HOME%"] EQU [""]

Activity

  1. zzzzfeng
    added
    a:bugPMD crashes or fails to analyse a file.
    on Jun 9, 2021
  2. LY1806620741 commented on Dec 27, 2021

    @LY1806620741
    LY1806620741
    on Dec 27, 2021
    More actions

    I have the same problem as you.
    This bug exists in windows10, Because space symbol in Env variable.

    pmd/pmd-dist/src/main/resources/scripts/designer.bat

    Line 40 in 81739da

    if [%JAVAFX_HOME%] EQU [] (

  3. oowekyala
    added this to the 6.42.0 milestone on Dec 27, 2021
  4. adangel
    self-assigned this
    on Jan 13, 2022
  5. adangel commented on Jan 13, 2022

    @adangel
    adangel
    on Jan 13, 2022
    Member
    More actions

    In this example:

    > set JAVAFX_HOME="C:\Program Files\javafx-sdk-17.0.1"
    > bin\designer.bat
    Fehler: Hauptklasse Files\javafx-sdk-17.0.1\lib\* konnte nicht gefunden oder geladen werden
    Ursache: java.lang.ClassNotFoundException: Files\javafx-sdk-17.0.1\lib\*
    

    my error is a bit different: it can't find the main class - which means the command line for calling java is messed up.

    Adding the suggested fix makes things worse:

    "Files\javafx-sdk-17.0.1""]" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
    

    After reading http://windowsinspired.com/understanding-the-command-line-string-and-arguments-received-by-a-windows-program/ the problem is actually here:

    pmd/pmd-dist/src/main/resources/scripts/designer.bat

    Line 51 in 7173f65

    java %PMD_JAVA_OPTS% %jreopts% -classpath "%classpath%" %OPTS% %MAIN_CLASS% %*

    The quotes around "%classpath%" are wrong.

  6. adangel
    added
    in:cliAffects the PMD Command Line Interface
    on Jan 13, 2022
  7. adangel
    changed the title [-]designer.bat has a error, that could not run[/-] [+][core] designer.bat has a error, that could not run[/+] on Jan 13, 2022
  8. adangel
    changed the title [-][core] designer.bat has a error, that could not run[/-] [+][core] designer.bat has a error when javafx_home contains spaces[/+] on Jan 13, 2022
  9. adangel
    changed the title [-][core] designer.bat has a error when javafx_home contains spaces[/-] [+][core] designer.bat has a error when JAVAFX_HOME contains spaces[/+] on Jan 13, 2022
  10. adangel
    changed the title [-][core] designer.bat has a error when JAVAFX_HOME contains spaces[/-] [+][core] designer.bat errors when JAVAFX_HOME contains spaces[/+] on Jan 13, 2022
  11. adangel
    added a commit that references this issue on Jan 13, 2022

    [core] Handle quotes correctly in designer.bat and other *.bat files

    This issue will close once commit 308173a is merged into the 'main' branch.
    308173a
  12. zzzzfeng
    closed this as completedon Jan 17, 2022
  13. adangel
    modified the milestone: 6.42.0 on Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @adangel
    adangel

Labels

a:bugPMD crashes or fails to analyse a file.in:cliAffects the PMD Command Line Interface

Type

No type

Projects

No projects

    Milestone

    • 6.42.0

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.