I am creating a jar file which when run displays an image the image path is hardcoded ie the whole path is written. So whenever the jar file is run on a different computer to my own the image is not shown.

So my question is how is it possible to display the image without explicity writing where the file is located, rather within the package itself?

Thanks in advance

by making sure the image is always in the same folder with your application and using relative paths

Not a problem :) If you found your solution, please mark this thread as solved.