The
exec() command that takes a command
string breaks the string up in tokens. That means the command array will contain the following elements:
There are two things wrong with this. Firstly, obviously your file name is broken up in two tokens, rather than one, and secondly, the slashes in your String are not uses as slashes but to escape the next character.
1. Properly escape the slashes in your path. It's best to use
Paths.get() to build the path and then call
Path.toString().
2. Call the
exec() overload that takes an array as its first argument.
An example on how to construct path strings properly: