Created attachment 36931 [details] 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
Created attachment 36932 [details] File bin/jmeter.sh with proposed fix
Thanks for the report. The fix is committed and will be included in the next release. It would be nice, if you could check, whether the fix helps with your setup. You can use the next nightly, if you don't want to build JMeter from source. If you think the fix is OK, than you can close this report. For future reports, it would be nicer to attach patches rather than complete files. It makes reasoning about the changes easier. Although in this case, the description was really clear, so it didn't matter. commit 9ddf0d961b9edfb09dfc95c0e6569f8559e0e860 AuthorDate: Thu Dec 26 16:14:50 2019 +0100 Shell scripts fail if space in JAVA_HOME path Contributed by ray7219 Bugzilla Id: 64034 --- bin/jmeter | 4 ++-- bin/jmeter.sh | 4 ++-- xdocs/changes.xml | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-)
Tested change, works fine for me. Ticket closed. Thank you Wrt. Attaching patches: will do.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5218