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

launch.bat does not respect whitespaces in JAVA_HOME variable #10

Open
philippseith opened this issue Jan 20, 2023 · 2 comments
Open

launch.bat does not respect whitespaces in JAVA_HOME variable #10

philippseith opened this issue Jan 20, 2023 · 2 comments

Comments

@philippseith
Copy link

philippseith commented Jan 20, 2023

When javaw is not in the path, but JAVA_HOME is set to a path with whitespaces (eg. c:\Program Files\OpenJDK\jdk-19.0.2 )
launch.bat and others fail launching winfoom.
This is because neither testing if exist %JAVA_HOME%\bin\javaw.exe nor start /B %%JAVA_EXE% work correctly with whitespaces.
it could be fixed be redefining JAVA_HOME with

for %%I in ("%JAVA_HOME%") do set JAVA_HOME=%%~sI

I will create an PR

@ecovaci
Copy link
Owner

ecovaci commented Jan 20, 2023

Isn't something like:

if exist "%JAVA_HOME%\bin\javaw.exe"

a simpler solution?

@philippseith
Copy link
Author

for the exist statement this is true, but for the start /b ... I couldn't get quoting working.

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

No branches or pull requests

2 participants