Hello,

I have a program that displays a frame that uses a canvas to display few rectangles and some images.
While executing the program with Eclipse IDE everything seems to work appropriately, when I compile and execute the program using windows command line the images are not displayed.

With eclipse, when running the program i had to re-size the frame in order to have the canvas displayed however when executing from command line, re-sizing is not needed; the rectangles are displayed but the images are not.

The images are located in the same "src" folder with the source code; i tried to use a couple of ways to define the path for the images however i do not think that this was the problem. I do know that mixing swing and awt can cause problems however i was hoping that this is not the case.

Thanks in advance

Recommended Answers

All 3 Replies

I seem to recall that Eclipse won't automatically include non-java files in a build. If I'm remembering correctly, you'll have to write an ant build file to get this to go. However, I'm not a real heavy-duty Eclipse user, so it's possible I'm wrong on this.

Take a look at the How To Use Icons tutorial. It addresses that issue.

thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.