https://bz.apache.org/bugzilla/show_bug.cgi?id=64034
Bug ID: 64034
Summary: Shell scripts fail if space in JAVA_HOME path
Product: JMeter
Version: 5.2.1
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Main
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: JMETER_5.2
Created attachment 36931
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36931&action=edit
File bin/jmeter with proposed fix
Both bin/jmeter and bin/jmeter.sh fail at line 128 respectively line 98 with a:
[: : integer expression expected
This is caused by not being able to run the java executable to obtain the Java
version.
Root cause lies at lines: 91+92 respectively 61+62 which set the JAVA_PATH and
JRE_HOME environment variables by running dirname. The argument given to
dirname is not encapsulated in quotes which results in dirname receiving two
(or more) arguments in case JAVA_PATH contains spaces. This can easily be fixed
by adding quotes:
JAVA_PATH=`dirname "$JAVA_PATH" 2>/dev/null`
JRE_HOME=`dirname "$JAVA_PATH" 2>/dev/null`
Attached are the fixed files
--
You are receiving this mail because:
You are the assignee for the bug.