java - Cannot create relative path -
my build folder of project has following structure:
build |-classes |package |-helloworld.class |-resources |-images |-image.png there imageicon object in helloworld class , declaration should this:
imageicon icon = new imageicon(helloworld.class.getresource("../../resources/images/picture.png")); but throws nullpointerexception in getresource() method. did make mistake?
Comments
Post a Comment