title: How to connect to server running on the system with password protection in java?
body: <p>I am trying to use Runtime.exec to run a class file from my java code but not able to launch the new process on Linux,The same is working on the windows..</p>
  
  <p>I want or launch the process from GUI (which I am running from a jar file named Launch.jar) on a button click.</p>
  
  <p>So I used the following code.</p>
  
  <pre><code>String curpath=System.getProperty("user.dir");
   Runtime.getRuntime().exec(new String[] { "/bin/bash", "-c", "java -classpath"+curpath+File.separator+" Launch.jar LaunchNewProcess" });
  </code></pre>