Skip to content

Instantly share code, notes, and snippets.

@liudong
Created November 11, 2012 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liudong/4054397 to your computer and use it in GitHub Desktop.
Save liudong/4054397 to your computer and use it in GitHub Desktop.
Java: Get Resource as InputStream from Class Path
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