I'll bet money that you are making the same mistake everyone does:
somewhere in your code.
You can't do this if the image file is in a jar file (like the jar file that also contains your code). Why? Because the jar file is actually a zip file, and the image is an entry inside of it, not a real file.
You have to use Class.getResourceAsStream() or ClassLoader.getResourceAsStream(). Google those.
EDIT: sortof ninja's by opiop. Also, troll, you're wrong. It was already working in eclipse, besides he exported it (probably) out of the workspace.