为已经运行了5分钟的Java应用程序提供重启功能的基本代码

```java
public class AutoRestart {
    public static void main(String[] args) {
        System.out.println("启动Java应用");
        
        try {
            Thread.sleep(300000); // 模拟运行5分钟
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        
        restartApplication();
    }

    private static void restartApplication() {
        try {
            String javaBin = System.getProperty("java.home") + "/bin/java";
            String classpath = System.getProperty("java.class.path");
            String className = AutoRestart.class.getCanonicalName();

            ProcessBuilder processBuilder = new ProcessBuilder(javaBin, "-cp", classpath, className);
            processBuilder.start();
        } catch (IOException e) {
            e.printStackTrace();
        }
        
        System.exit(0);
    }
}
```

请在保持功能不变的基础上，改成更简洁的代码，同时保持可读性。
user
```java
public class AutoRestart {
    public static void main(String[] args) {
        System.out.println("启动Java应用");
        try {
            Thread.sleep(300000); // 运行5分钟
            restart();
        } catch (InterruptedException | IOException e) {
            e.printStackTrace();
        }
    }

    private static void restart() throws IOException {
        new ProcessBuilder(
            System.getProperty("java.home") + "/bin/java", 
            "-cp", 
            System.getProperty("java.class.path"), 
            AutoRestart.class.getCanonicalName()
        ).start();
        System.exit(0);
    }
}
```
assistant