How do I make a java program restart itself?
807603Jan 28 2008 — edited Jan 28 2008Hello, I am trying to make my java program restart and launch itself again for a certain number of times (let's say 10). For example, for the following simple program:
class myfirstjavaprog
{
public static void main(String args[])
{
System.out.println("Hello World!");
}
}
Once the program finished its work (it prints "Hello World"), is there a way to make it restart and launch itself automatically 10 times again? I know that a FOR loop is involved, but I don't know the command or the code to make the program restart and launch itself again and again? Can anyone please help?