Drill cannot startup if java path contains whitespace
- Dominant language
- Java
- Stars
- 2k
- Forks
- 990
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 5
Description
**Describe the bug**
My JAVA_PATH set to "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home",
when run `./drillbit.sh start`, drill cannot startup and report error:
` /Users/Chester/Gwssi/ApacheDrill/apache-drill-1.19.0-SNAPSHOT/bin/runbit: line 109: /Library/Internet: No such file or directory`
`/Users/Chester/Gwssi/ApacheDrill/apache-drill-1.19.0-SNAPSHOT/bin/runbit: line 109: exec: /Library/Internet: cannot execute: No such file or directory`
**To Reproduce**
Steps to reproduce the behavior:
1. set JAVA_PATH to a jdk path which contains whitespace:
`export JAVA_PATH=/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home`
2. startup drill:
`./bin/drillbit.sh start`
3. See error in log file:
`log/drillbit.out`
**Expected behavior**
Drill cannot startup normally.
**Screenshots**


**Desktop (please complete the following information):**
- MacOS Big Sur 11.2.3
**Additional context**
print the command of line 109 in `/bin/runbit`:
`echo exec $BITCMD`
See the print result in `log/drillbit.out`:

The whitespace in java path doesn't come up with a backslash escape, so that `exec` cannot find the correct java path.
After I set the java path to a jdk without white space, like:
`/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home`
Drill startup process back to normal.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with bin/runbit at line 109 and inspect how BITCMD is echoed and executed. Reproduce the failure with JAVA_PATH set to the whitespace-containing path and ./bin/drillbit.sh start, then verify that Drill starts normally and log/drillbit.out shows the correct command handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100