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

Java paths with spaces won't work on Windows (*.bat files) #15

Closed
gregid opened this issue Jul 8, 2022 · 4 comments
Closed

Java paths with spaces won't work on Windows (*.bat files) #15

gregid opened this issue Jul 8, 2022 · 4 comments

Comments

@gregid
Copy link

gregid commented Jul 8, 2022

None of the *.bat files will work if the %JAVA_HOME% and %JAVAFX_HOME% paths include spaces on Windows (e.g. most common C:\Program Files\JAVAHOME\)

The error will be System Windows cannot find C:\Program

  • OS: Win 10
  • Version 3.7.0, 3.8.0

These paths should be wrapped in double quotes.

@point85
Copy link
Owner

point85 commented Jul 8, 2022

The cleanest generic option is to use the system environment variable JAVA_HOME pointing to the bin folder. Then in the batch files just "start javaw.exe". If you have another location, just put the full path in the .bat files.

@point85 point85 closed this as completed Jul 8, 2022
@gregid
Copy link
Author

gregid commented Jul 9, 2022

In case you would decide to change *.bat files to also work with more problematic paths here is where the double quotes should be:

start "" "%JAVA_HOME%bin\javaw.exe" -p "%JAVAFX_HOME%\lib" --add-modules javafx.controls,javafx.fxml,javafx.web -Dlog4j.configurationFile=config\logging\log4j2.xml -jar oee-apps-3.7.0.jar DESIGNER jdbc:hsqldb:hsql://localhost/OEE SA 

The empty "" is required for cmd window title when double quotes are used.

@gregid
Copy link
Author

gregid commented Jul 9, 2022

With the changes in commit:
d905065

It would still fail if %JAVAFX_HOME% contain spaces

@point85
Copy link
Owner

point85 commented Jul 9, 2022 via email

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