On Mon, 9 Mar 2020 at 17:58, Judi Rastall <[email protected]> wrote: > Trying to run from the CMD prompt, I see this error message: > Exception in thread "main" java.lang.NullPointerException > at javax.swing.ImageIcon.<init>(Unknown Source) ... > Why will a program that runs perfectly well within the IDE fail to run when > compiles?
Quite easily! My guess is the way you're passing the icon location into ImageIcon. You may want to Google on loading icons bundling in JARs - you'll find lots of info. Loading resources from inside a JAR is (can be) different to loading from the filesystem. Best wishes, Neil --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
