We have a connection pooling component (JAR file) for one of our application. As of now the application connection details are bundled with-in the JAR file (in .proper
Simplest way is below. It will load application.properties from cfg folder outside of the jar file.
Directory Structure
|-cfg-->application.properties
|-somerunnable.jar
Code:
Properties mainProperties = new Properties();
mainProperties.load(new FileInputStream("./cfg/application.properties"));
System.out.println(mainProperties.getProperty("error.message"));