JanusGraph / JanusGraph/janusgraph
.bat and .sh Execution Fail When Run From a Path That Contains Spaces
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
The .bat and .sh files under the "janusgraph-0.5.2/bin" folder give errors when you try to run them from a path that contains spaces. For example "C:\Program Files\janusgraph-0.5.2"
Here is the Linux shell output:
```
bassem@Bassem-Laptop:/mnt/c/Program Files/janusgraph-0.5.2/bin$ ./gremlin.sh
./gremlin.sh: line 39: cd: too many arguments
bassem@Bassem-Laptop:/mnt/c/Program Files/janusgraph-0.5.2/bin$ ./gremlin-server.sh
./gremlin-server.sh: line 32: cd: too many arguments
./gremlin-server.sh: line 43: cd: too many arguments
./gremlin-server.sh: line 48: cd: too many arguments
./gremlin-server.sh: line 53: cd: too many arguments
find: ‘/mnt/c/Program’: No such file or directory
find: ‘Files/janusgraph-0.5.2/bin’: No such file or directory
find: ‘/mnt/c/Program’: No such file or directory
find: ‘Files/janusgraph-0.5.2/bin’: No such file or directory
find: ‘/mnt/c/Program’: No such file or directory
find: ‘Files/janusgraph-0.5.2/bin’: No such file or directory
find: ‘/mnt/c/Program’: No such file or directory
find: ‘Files/janusgraph-0.5.2/bin’: No such file or directory
./gremlin-server.sh: line 80: cd: too many arguments
WARNING: Tried /mnt/c/Program Files/janusgraph-0.5.2/bin/gremlin-server.yaml and /mnt/c/Program Files/janusgraph-0.5.2/bin//mnt/c/Program Files/janusgraph-0.5.2/bin/gremlin-server.yaml. Neither were readable.
Error opening zip file or JAR manifest missing : /mnt/c/Program
Error occurred during initialization of VM
agent library failed to init: instrument
```
And here is the Windows Command Prompt output
```
C:\Program Files\janusgraph-0.5.2\bin>gremlin.bat
Error: Could not find or load main class Files\janusgraph-0.5.2\ext
C:\Program Files\janusgraph-0.5.2\bin>gremlin-server.bat
Error: Could not find or load main class Files\janusgraph-0.5.2\logs
```
Please include configurations and logs if available.
For confirmed bugs, please report:
- Version: 0.5.2
- Storage Backend: Any
- Mixed Index Backend: Any
- Mailing list Thread URL: https://groups.google.com/g/janusgraph-users/c/kzat1tbotCM/m/gIuCCw1vCAAJ
- Steps to Reproduce: Place the "janusgraph-0.5.2" folder in a path that contains spaces and try to run "gremlin.sh" and "gremlin-server.sh" from Linux and "gremlin.bat" and "gremlin-server.bat" from Windows.
Contributor guide
Research direction
Start with the .sh and .bat launchers under janusgraph-0.5.2/bin, especially gremlin.sh, gremlin-server.sh, gremlin.bat, and gremlin-server.bat. Reproduce the reported failures from a path containing spaces, then verify that all four commands launch successfully from such paths on their respective platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, shell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100