Yes, you can register a shutdown hook with Runtime.addShutdownHook()
.
More Related Contents:
- When should we call System.exit in Java
- How do I exit a while loop in Java?
- How do I get a platform-dependent new line character?
- Why is Java’s SimpleDateFormat not thread-safe? [duplicate]
- Java time-based map/cache with expiring keys [closed]
- Does Java casting introduce overhead? Why?
- Right way to implement equals contract [duplicate]
- How do I read input character-by-character in Java?
- How do I analyze a .hprof file?
- When does the JPA set a @GeneratedValue @Id
- Servlet Mapping using web.xml
- Java: unparseable date exception
- Android Layout with ListView and Buttons
- What is an “internal address” in Java?
- Why does java app crash in gdb but runs normally in real life?
- How to get location of a mouse click relative to a swing window
- How to get local application data folder in Java? [duplicate]
- How to show digital PDF signature in all document’s Page using iText?
- What is the difference between PermGen and Metaspace?
- How to pass Table-Valued parameters from java to sql server stored procedure?
- javac : Compiling a .java file which uses other classes in it
- Simple way to sort strings in the (case sensitive) alphabetical order
- Spring properties that depend on other properties
- Why does an IllegalThreadStateException occur when Thread.start is called again
- is it is possible to disable the windows keys using java
- JSON Jackson parse different keys into same field
- Accessing outer class variable in inner class
- Proper way to handle action bar up button?
- What makes the execution order of threads unpredictable?
- Can we load multiple Certificates & Keys in a Key Store?