これを実行してもコマンドラインでは機能しないと思われるため、Java から実行しても機能しません。
System.out.println("Test restarting the application!");
Process exec = Runtime.getRuntime().exec(new String[]{"java", "-cp", System.getProperty("java.class.path"), "RestartApplication"});
BufferedReader br = new BufferedReader(new InputStreamReader(exec.getInputStream()));
for (String line; (line = br.readLine()) != null; )
System.out.println(line);
版画
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!
Test restarting the application!