In the code sample below, when I test the code in Eclipse it works just fine. However, when I export the jar file and test it via the command line, it throws an error: IIO
IIO
You should try to check if your class is in the same directory than Images inside your jar.
| |- Your class |- Images |- questionMark.png
Also, have you tried using directly your url object ?
File file = new File(url);