camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.08k stars 1.54k forks source link

Camunda Run doesn't launch using a JDK installed in a folder with spaces #4227

Closed hkupitz closed 5 months ago

hkupitz commented 5 months ago

Environment

7.20.4-ee Microsoft Windows 10 Pro (Build 19045)

Description

When trying to launch Camunda Run (via start.bat) with a JDK used that is located in a folder with spaces in its path (e.g. "C:\Program Files\Eclipse Adoptium\jdk-21.0.2.13-hotspot") the application doesn't successfully start. Instead the following error popup shows up:

image

Steps to reproduce

  1. Install a JDK into a folder with spaces in it
  2. Download & extract a fresh copy of Camunda Run
  3. Try to launch Camunda Run via start.bat.

Observed Behavior

The application doesn't successfully launch. Instead an error popup is shown.

Expected behavior

Camunda Run should launch without any errors using a JDK that is located in a folder with spaces in its path.

Solution Ideas

Wrapping the argument details (%JAVA%) in quotation marks (lines 150 + 153) seems to fix the problem. Example:

start "%APPNAME%" "%JAVA%" -Dloader.path="%classPath%" -Dcamunda.deploymentDir="%DEPLOYMENTDIR%" %JAVA_OPTS% -jar "%BASEDIR%camunda-bpm-run-core.jar" --spring.config.location=file:"%configuration%"

### Pull Requests
- [ ] https://github.com/camunda/camunda-bpm-platform/pull/4228
- [ ] https://github.com/camunda/camunda-bpm-platform-maintenance/pull/1188
yanavasileva commented 5 months ago

Issue is reproducible only on Windows OS. no need for adjustment on shell script.