Example usage for org.springframework.boot.devtools.restart RestartLauncher RestartLauncher

List of usage examples for org.springframework.boot.devtools.restart RestartLauncher RestartLauncher

Introduction

In this page you can find the example usage for org.springframework.boot.devtools.restart RestartLauncher RestartLauncher.

Prototype

RestartLauncher(ClassLoader classLoader, String mainClassName, String[] args,
            UncaughtExceptionHandler exceptionHandler) 

Source Link

Usage

From source file:org.springframework.boot.devtools.restart.Restarter.java

/**
 * Relaunch the application using the specified classloader.
 * @param classLoader the classloader to use
 * @return any exception that caused the launch to fail or {@code null}
 * @throws Exception in case of errors//from ww w.j a  v a 2 s  .c  o  m
 */
protected Throwable relaunch(ClassLoader classLoader) throws Exception {
    RestartLauncher launcher = new RestartLauncher(classLoader, this.mainClassName, this.args,
            this.exceptionHandler);
    launcher.start();
    launcher.join();
    return launcher.getError();
}