Restart myself - can I reinitialize everything from scratch?
问题 I have something like this: public static final String path; static { path = loadProperties("config.conf").getProperty("path"); } public static void main(String... args) { // ... do stuff (starting threads that reads the final path variable) // someone want's to update the path (in the config.conf file) restart(); // ??? } I want to reinitialize the JVM calling the static initializer again, and then main(...) ! Can it be done? 回答1: You can start your application using a custom class loader,