public class StartupNotification
extends java.lang.Object
This class allows you to register a listener to receive startup events in single instance mode on Microsoft Windows and file open events on macOS.
On macOS, this is a facade for the platform-specific Java extensions. If you want to use additional features, please use the com.apple.eawt classes directly that are available in all pre-Java 9 macOS JREs or the new Java 9 java.awt.desktop functionality.Modifier and Type | Class and Description |
---|---|
static interface |
StartupNotification.Listener
The interface for startup events in single instance mode or for open file events on macOS.
|
Constructor and Description |
---|
StartupNotification() |
Modifier and Type | Method and Description |
---|---|
static void |
registerStartupListener(StartupNotification.Listener listener)
Register a listener to receive startup events in single instance mode on
Microsoft Windows or to receive file open events on macOS.
|
static void |
setHandleQuit(boolean handleQuit)
Sets if the Quit command should be handled on macOS (that means if the application
should quit when the command is invoked).
|
public static void registerStartupListener(StartupNotification.Listener listener)
listener
- the listenerpublic static void setHandleQuit(boolean handleQuit)
handleQuit
- true if quit should be handled