.bat and .sh Execution Fail When Run From a Path That Contains Spaces


Bassem Naguib <bass...@...>
 

Thanks Marc! I just posted the GitHub issue

On Sunday, November 15, 2020 at 1:18:11 AM UTC-7 HadoopMarc wrote:
Hi,

I can reproduce this for linux. So, please, create the issue on github with the text above.

Thanks,    Marc

Op zondag 15 november 2020 om 08:36:45 UTC+1 schreef ba...@...:

I was about to open an issue on GitHub. But I saw a message that asks me to post here first.

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


HadoopMarc <bi...@...>
 

Hi,

I can reproduce this for linux. So, please, create the issue on github with the text above.

Thanks,    Marc

Op zondag 15 november 2020 om 08:36:45 UTC+1 schreef ba...@...:


I was about to open an issue on GitHub. But I saw a message that asks me to post here first.

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


Bassem Naguib <bass...@...>
 


I was about to open an issue on GitHub. But I saw a message that asks me to post here first.

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