import java.awt.image.BufferedImage; import javax.imageio.ImageIO; public class Main { public static void main(String[] args) throws Exception { BufferedImage image = ImageIO.read(Main.class.getResource("S.jpg")); } }