Created
November 11, 2012 10:19
-
-
Save liudong/4054397 to your computer and use it in GitHub Desktop.
Java: Get Resource as InputStream from Class Path
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
java.io.InputStream inputStream = getClass().getClassLoader().getResourceAsStream("relative-path"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment