Object
XRuntime
Additions to standard java.lang.Runtime
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
XRuntime
public XRuntime()
-
-
Method Details
-
addShutdownHook
Registers shutdown hook on Runtime.getRuntime(). Equivalent to:Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { try { // code } catch (Exception e) { e.printStackTrace(); } } });
But much shorter:
XRuntime.addShutdownHook(() -> { // code })
-