Executing multiple command shell from java
<p>I was looking for a manner to execute several commans shell from java. I found this in stackoverflow but it helps only for executing one command shell per session :</p>

<pre><code>try {  
        // Execute command  
        String command = "ls -la";  
        StringBuffer ret=new StringBuffer();  
        Process p = Runtime.getRuntime().exec(command);  

        // Get the input stream and read from it  
        InputStream in = child.getInputStream();  
        int c;  
        while ((c = in.read()) != -1) {  
        ret.append((char)c);  
        }  
        in.close();  
        System.out.println(ret.toString());  
    } catch (IOException e) {  
    e.printStackTrace();  
    }  
</code></pre>

<p>is there anyway to execute many commands in the same session using code above ?</p>
