Last active
October 11, 2016 09:30
-
-
Save tonfever/c5a797c3c9fa643ed12f337b7d4a12fc to your computer and use it in GitHub Desktop.
Sample of reading a property file from classpath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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