A startup class is a Java program that is automatically loaded and executed when a server is started or restarted. By default, startup classes are loaded and executed after all other server subsystems have initialized and after the server deploys modules. A shutdown class is a Java program that is automatically loaded and executed when you gracefully shut down a server.