So i am making a basic game and i am loading the images as such :
try { background = ImageIO.read(new File(res/textures/bg.jpg")); buildingManager.getButton().setCupcake_normal(ImageIO.read(new File("res/textures/cupcake normal.png"))); buildingManager.getButton().setCupcake_clicked(ImageIO.read(new File("res/textures/cupcake clicked.png"))); } catch (IOException e) { e.printStackTrace(); }
Alot of sites say i have to add the folder where the folders are in as an class folder. So i did that but i dont get the same icon with the folder. i get this instead : code.PNG
Also i see the images inside the exported jar but they cant be reached, how do i fix this?