Hi Everybody,
My program should show some stuff in the main area including an image (a gif file). It works when I run it from within Eclipse or when it starts from a command prompt window (OS WinXP).
With Eclipse I've created an executable jar file but when I try to run the program from the jar it shows everything but the image. I checked if the image got into the jar and it did.
Here are the code lines dealing with the image:
Any idea what is wrong?
Thanks,
Alex
My program should show some stuff in the main area including an image (a gif file). It works when I run it from within Eclipse or when it starts from a command prompt window (OS WinXP).
With Eclipse I've created an executable jar file but when I try to run the program from the jar it shows everything but the image. I checked if the image got into the jar and it did.
Here are the code lines dealing with the image:
Code:
image=getToolkit().getImage(getClass().getResource("myImage.gif"));
...
g2d.drawImage(image, 0, 0, areaWidth,this.getHeight(), this);
Any idea what is wrong?
Thanks,
Alex