Skip to content

cannot run PMD, java not found #6

Description

@adamskwersky

Describe the bug
A clear and concise description of what the bug is.

I get "stdout:No java executable found in PATH" even though Java is in the path. Playing with the bat file suggests that that the bat file cannot find ANYTHING on the path ("cmd", "where", etc) , despite the "path" command showing c:\Windows\Sytem32 in the path.

PMD for Java Output

PMD for Java Settings
###################################
Analyzing
env: {"CLASSPATH":""c:\Users\restofpathremoved\*"","PATH":""C:\web\jdk-18.0.2.11\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\web\jdk-18.0.2.1+1\bin;C:\Users\\AppData\Local\Programs\Microsoft VS Code\bin""}
PMD Command: "c:\Users<me>.vscode\extensions\cracrayol.pmd-java-0.7.3\bin\pmd\bin\pmd" check --no-progress -f json --no-cache -d "file name removed" -R "c:\Users<me>.vscode\extensions\cracrayol.pmd-java-0.7.3\rulesets\quickstart.xml"
stdout:No java executable found in PATH
Failed Exit Code: 1

Note, if I copy the printed pmd command and run in a command shell, it works.
I had to block out some sensitive information from the report. It shouldn't be necessary to know that...

None of these are set.

  • pmdBinPath:
  • rulesets:
  • additionalClassPaths:

Java File

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • OS: Windows 10 Enteprise
  • vscode:1.94.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions