Hi i want to add my own icon to the project but it keeps throwing this error:
Exception in thread "main" java.lang.IllegalArgumentException: Argument cannot be null
I have added the new icon to the res.jar file, created it in PaintShop as a public static Image, initialized it:
public static Image iconFid;
iconFid = loadImage("/img/icons/fid_icon.GIF");
I then call the image in another class:
loginItem.setImage(PaintShop.loadImage(toolImgPath + "fid_icon.GIF", true));
Can you please tell me if there is a step i am missing. I have tried both initializing it on startup and without initializing it loading from the class.
Any help would be appreciated
Why don't you use the static image directly but load it again?
I have tried this.
It seems that when i add my own icon to the res.jar file in the img/icons folder it is causing an error. I have been trying for most of today to change just one icon!! When i changed the path of another icon to that of mine the error occurred - when i changed it back to the first icon which had previously worked the error is still there.
I apologise i am only beginning to understand the source code but i cant see why my code would break the whole application.
was changed to :
Hm, the problem must be elsewhere then. I guess you are developing with an IDE like Eclipse? If you follow these steps it should work:
public static Image iconFoo;
Note that when you run RSSOwl outside the IDE the res.jar is extracted into the rssowl.jar using the given build.xml. Just in case you wonder why the res.jar is not present in the file system.
Hope that helps,
Thank you so much for your replies. The above steps you have described are what i had been trying. I think my problem was with the jar file itself.