I'm working in java swing application. I'm using icon images which is placed inside uploads folder. When i run my project it's working fine.
I export my project as jar. When i run my jar file it show file not found error.
This is my code,
BufferedImage img = ImageIO.read(new File(Config.IMAGE_RESOURCE_FOLDER + "/" + fileName));
Config.IMAGE_RESOURCE_FOLDER(what path does it point to)?./images, where.is the current directory, i.e. the directory from which thejavaprogram was started. So, if you didn't execute Java from the right directory, or if your images are in a folder nameduploads, it can't possibly work.