Help!!! problem with ImageIcon!!!

I use ImageIcon in Local's APP no problem,

image1 = new ImageIcon(cnopensource.MainFrame.class.getResource("Open24.gif"));

I make this APP into a jar for jws.

when it excute at the client, The jws console print

ava.lang.NullPointerException

at javax.swing.ImageIcon.<init>(ImageIcon.java:134)

at cnopensource.MainFrame.jbInit(MainFrame.java:108)

at cnopensource.MainFrame.<init>(MainFrame.java:99)

.......................

the "MainFrame.java:108" is

image1 = new ImageIcon(cnopensource.MainFrame.class.getResource("Open24.gif"));

everyone tell me why? How to slove this problem?

I apologized for my limited English.

[724 byte] By [wflm] at [2007-9-26 2:12:18]
# 1
Hi, I found this out the hard way. Don't mix upper and lower case letters. Use lower case letters only and everything will work as expected. Don't ask me why. To summarize: Rename Open24.gif to open24.gif That will fix it.- Gerald
geraldb at 2007-6-29 9:05:23 > top of Java-index,Desktop,Deploying...
# 2

Thanks geraldb!!! very!!

I solved this problem by your way.

The reason is that the filename in source and the filename in jar is different.

I can use the upper letters,only need keep the filename in source and in jar consistent. it worked no problem!!!

Thanks again!!! 8-)

wflm at 2007-6-29 9:05:23 > top of Java-index,Desktop,Deploying...