You want to use ClassLoader.getResource or getResourceAsStream, both of which will allow you to read files stored within your JAR. You can access the class loader with YourClass.class.getClassLoader(). See this question for more details: Load a resource contained in a jar