Including Images with an executable jar
Files in a Jar are not files in the sense of a file on disk. They are simply a (possibly) compressed stream of bytes. Java makes it easy to extract these “resources” from Jar files through the use of the ClassLoader background = ImageIO.read(getClass().getResource(“/wood.jpeg”)); Should work… This will return a URL which ImageIO can use … Read more