Runtime.getRuntime().exec(String) fails to create a new process | Java + LINUX
<p>I am stuck with an issue regarding the failure of  Runtime.getRuntime().exec(String)  that creates a new process in our application. Though this code worked successfully on the sun system (java 1.4, tomcat 4.0) it does not seem to work at all on Linux. The configurations on linux system are</p>

<ul>
<li>Linux:          Fedora 10, Java version:      1.6,  Tomcat version: 5.5</li>
</ul>

<p>Here is the code snippet that runs TestProcess class as a new process:</p>

<pre><code>    process = Runtime.getRuntime().
               exec (new String[] {"/bin/sh","-c",
                 "java OcwCommon.OcwProcessController" + " " +action+ " " +Id);
</code></pre>

<p>The ‘process’ variable does not return a null. And no logs are created for the new process. Hence we assume that it is not getting executed.</p>

<p>i am running tomcat with fsuser and i have added classpath, path etc env variables in /etc/profile file. So it gets loaded whenever system boots.</p>

<p>Can there be any authorization issue in creating a new process? Though we have double checked it.</p>

<p>Any pointers would be much appreciated.</p>
