Hi,
I wrote a Hello World
Java program and tried to invoke it from another program.
public class RunExample
{
public static void main(
String []args)
{
Runtime rtime = Runtime.getRuntime();
try
{
rtime.exec("java HelloWorld");
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
The program compiles fine. The path and class path are set properly. But when i execute it, the second program (i.e. HelloWorld) does not print the output -- HelloWorld on the screen.
What could be wrong?
Madhesh