I am looking for suggestion in putting image file maven web project. One of classes under src/main/java need to use an image file. My problem is, if i put image file under s
It seems that your problem is the way you read the image. You can't (or shouldn't) read the image from a Path. The Path might change on every system.
You need to read the image from the classpath like:
MyClass.class.getResource("/images/image.jpg")
or
MyClass.class.getResourceAsStream("/images/image.jpg")
For this to work, the image Folder needs to be on the classpath. Maven will put everything in the classpath, that is under main/resources. So thats where your image folder should be.