Java Image Loading from .jar File
问题 I'm trying to load an image from a folder named Custom that the user places images into. Here is the method I used to load images: public BufferedImage getCustImg(String path){ BufferedImage img = null; String s = get.getProgramPath(); path = path.trim(); String s2 = s + "\\Custom\\" + path + ".png"; try{ img = ImageIO.read(this.getClass().getResource(s2));//gets image from file path } catch (IOException e) { e.printStackTrace(); } return img; } Here is the program path method public String