space in path using java
<p>Hi, I have a big problem. I'm making a java program and I have to call an exe file in a folder that have whitespace. This program also has 2 arguments that always have whitspace in the path.
Example:</p>

<p>C:\Users\Program File\convert image\convert.exe C:\users\image exe\image.jpeg C:\Users\out put\out.bmp</p>

<p>I have to do this in Windows but i want generalize it for every OS.<br/> <br/>
My code is: <br/> <br/>
</p>

<pre><code>Runtime run = Runtime.getRuntime();&lt;br/&gt;
String path_current = System.getProperty("user.dir");&lt;br/&gt;
String [] uno = new String[]{"cmd","/c",path_current+"\\\convert\\\convert.exe",path_current+"\\\f.jpeg", path_current+"\\\fr.bmp"};&lt;br/&gt;
Process proc2 = run.exec(uno);&lt;br/&gt;
proc2.waitFor();&lt;br/&gt;
</code></pre>

<p>This does not work. I tried removing the String array and inserting a simple String with "\"" before and after the path but that didn't work. How do I resolve this?</p>
