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.11k stars 1.55k forks source link

Cannot specify a different Java home when starting Run from Windows cmd #3907

Closed ThorbenLindhauer closed 10 months ago

ThorbenLindhauer commented 11 months ago

Environment (Required on creation)

Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)

If the Java executable on the path points to a version < 17, I have to use the JAVA_HOME environment variable to specify a Java 17 installation. This doesn't work in the environment above (may, but probably is not related to the path containing a space character).

Steps to reproduce (Required on creation)

  1. Download and unpack Run (I used version 7.20.1)
  2. Open cmd in Run home directory
  3. set JAVA_HOME=C:\Program Files\Java\jdk-17.0.2 (using quotes around the value leads to a different problem in the start script)
  4. start.bat

Observed Behavior (Required on creation)

Expected behavior (Required on creation)

Root Cause (Required on prioritization)

Solution Ideas

Hints

Links

Breakdown

### Pull Requests
- [ ] https://github.com/camunda/camunda-bpm-platform/pull/3958
- [ ] https://github.com/camunda/camunda-bpm-platform-maintenance/pull/1123

Dev2QA handover

yanavasileva commented 11 months ago

I will have a look at the issue this week.

yanavasileva commented 11 months ago

I was able to reproduce the issue. I think we need to address the issue as it could be a common use case. I created a PR but the use case a path with space is not working. So a bit more work is needed.

An alternative will be to remove the java check.

Workaround: use JAVA_HOME with PATH assignment:

set JAVA_HOME=C:\Program Files\Java\jdk-17.0.2\bin\java
set PATH=%JAVA_HOME%\bin;%PATH%
yanavasileva commented 10 months ago

Notes:

yanavasileva commented 10 months ago

To reviewer:

yanavasileva commented 10 months ago

Notes: