java.io.IOException: Cannot run program "set": CreateProcess error=2, The system cannot find the file specified
<p>I am trying to run set command from eclipse, but i am getting the below exception.</p>

<pre><code>java.io.IOException: Cannot run program "set": CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at java.lang.Runtime.exec(Runtime.java:620)
    at java.lang.Runtime.exec(Runtime.java:450)
    at java.lang.Runtime.exec(Runtime.java:347)
</code></pre>

<p>Here is my piece of code:</p>

<pre><code>String command = "set Path=C:/Program Files/Java/jdk1.6.0_21/bin";
Process p = Runtime.getRuntime().exec(command);
</code></pre>