Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch failes if Java Path contains whitespaces #5668

Open
jsc57x opened this issue Apr 20, 2023 · 4 comments
Open

Batch failes if Java Path contains whitespaces #5668

jsc57x opened this issue Apr 20, 2023 · 4 comments
Labels

Comments

@jsc57x
Copy link

jsc57x commented Apr 20, 2023

Describe the bug
If the JAVACMD Path contains whitespaces the batch failes.

Version of dependency-check used
8.2.1

To Reproduce
Steps to reproduce the behavior:
Call the bat file with a JAVACMD variable which contains whitespaces. It fails at line 82 or, if you escape the JAVACMD path with "" when it is called, it fails at line 68.

Expected behavior
The JAVACMD variable is escaped in line 68 and 82.

@jsc57x jsc57x added the bug label Apr 20, 2023
@aikebah
Copy link
Collaborator

aikebah commented May 13, 2023

Look like mojohaus/appassembler#114 is causing this

@matheusmogi
Copy link

after I add the double-quotes to the %JAVACMD%, I'm getting a different error:

'"C:\Program Files (x86)\Java\jre1.8.0_361\bin"' is not recognized as an internal or external command,
operable program or batch file.

@aikebah
Copy link
Collaborator

aikebah commented Jul 12, 2023

Your JAVACMD value is clearly not proper. It should hold the full path+filename of java.exe

@Mythikos
Copy link

Having this issue too, our java path is in "C:\Program Files...". Adding quotes around the %JAVACMD% variable resolved the issue for us. Using version 9.2.0 on Windows Server 2019 standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants