How can I execute a Java System (shell) command that has a space in the pathname?
I\'ve tried putting quotes and a backslash (), But it does not work.
You can use it in the following way without having to introduce any backslashes: Runtime.getRuntime().exec(new String[]{"ln", "-s", "dir1/dir2", "my dir/dir2"});
Runtime.getRuntime().exec(new String[]{"ln", "-s", "dir1/dir2", "my dir/dir2"});