Hi,
i don't know if u can use a relative path, but here is a other idea how u can implement an image:
1. File myFile = new File("file.class");
U make an instanz of ur class itself with the File-Class.
2. StrinBuffer progPath= new StringBuffer(myFile.getAbsolutePath());
getting the absolute Path of your programm
3.
3.1 c:\programm files\myprograms\javaapps\package\mainFile.class
remove that what u don't need
3.2 c:\programm files\myprograms\javaapps\
U work with a
String, so it's not so difficult, u can use the method delete() of the class String.
3.3 adding the new path (or relative path)
progPath+"images"+System.getProperty("file.separator")+"yourImage.gif";
4. the result is an absolute path that works on every system
This is for i.e 4 Windows-Systems
c:\programm files\myprograms\javaapps\images\yourImage.gif
Hope that's something that does what u want.
greetx
Lars