public class Restarter extends Object
| Constructor and Description |
|---|
Restarter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
autoRestart(Runnable runBeforeRestart)
Restart the current Java application
|
static void |
restartWith(Runnable runBeforeRestart,
String... parameters)
Restart the specified Java application
|
public static void autoRestart(Runnable runBeforeRestart) throws IllegalStateException
runBeforeRestart - some custom code to be run before restartingIllegalStateException - if cannot find 'start command'public static void restartWith(Runnable runBeforeRestart, String... parameters)
runBeforeRestart - some custom code to be run before restartingparameters - parameter to restart application like "-jar application.jar"IOExceptionCopyright © 2010–2014 Intelligents-ia. All rights reserved.