Hi,
My problem is as follows i am calling a perl script from a
java program using runtime.getruntime.exec and the problem is that i am not able to make the java program wait until whole of the perl script execution is completed.
the code is as follows:
try
{
new
Thread()
{
public void run()
{
try
{
Process p = Runtime.getRuntime().exec("perl c:/basepairfinder/final.pl "+path);
p.waitFor();
int i = p.exitValue();
}
catch (Exception e)
{
throw new RuntimeException(e.getMessage());
}
}
}.start();
JOptionPane.showMessageDialog(this, "Process Completed :"+path);
}
catch (Exception e2)
{
System.out.println(e2);
}
kindly help me out in this