{{theTime}}

Search This Blog

Total Pageviews

Java ClassLoader Help:

How to Load xml file located in a jar file.

Eg: If xml exists in com/tools/util/resources/data.xml, use ClassLoader to load the xml as Stream.

InputStream in = ClassLoader.getResourceAsStream("com/tools/util/resources/data.xml")

No comments:

Java Shutdown Hook

Runtime.getRuntime().addShutdownHook(new Thread(() -> {             System.out.println("Shutdown started");              //  Cl...