Skip to content

Instantly share code, notes, and snippets.

@tonfever
Last active October 11, 2016 09:30
Show Gist options
  • Save tonfever/c5a797c3c9fa643ed12f337b7d4a12fc to your computer and use it in GitHub Desktop.
Save tonfever/c5a797c3c9fa643ed12f337b7d4a12fc to your computer and use it in GitHub Desktop.
Sample of reading a property file from classpath
Properties properties = new Properties();
try {
properties.load(this.getClass().getClassLoader().getResourceAsStream("yourconfig.properties"));
} catch (IOException e) {
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment