问题 I was loading an image resource with the following code and it works fine from my dev environment (netbeans) but threw an exception as soon as it ran from the desktop. new ImageIcon(Images.class.getResource("images/highlighter24.gif")); I traced it down to my file having different case than in the code. Fine, my bad, but why the inconsistent behavior? Gremlins? Note: I'm running on windows before you ask. 回答1: Let me guess: in NetBeans it was loading it from the file system (which is case