I have a java application. It can be started with couple of command line flags. I want to provide ability \"restart\" the application by user.
Currently we save the
invoke new using
java -jar appname.jar arg1 arg2
close current one using
System.exit(0);
Here you won't face problem of retaining arg
Here is example to invoke commands from java app