external .jar dependancies and custom image resources

Discussion created by KDCarey on Feb 18, 2007
Latest reply on Feb 19, 2007 by Ryan Graham


I am developing an experimental sparkplug that will display RSS/ATOM newsfeeds in a custom tab added to Spark. This will require custom images (the RSS logo etc.) and access to an external .jar file (ROME libraries). The images and external .jar files have been placed in the pluggin-classes.jar file (the external .jar files are at the root level and the images in a subdirectory called ''images''). I am unable to access these images and .jar files. For example when I try to load an image with the code:




     ImageIcon logo = new ImageIcon("images/rss_logo1.jpg");






     ImageIcon logo = new ImageIcon("lib/images/rss_logo1.jpg");




I am unable to load the image. However when I specify a full path:




      ImageIcon logo = new ImageIcon("D:/Data/My Pictures/RSS/rss_logo1.jpg");




The image loads correctly.  What is the relative path of the resources I have included in my sparkplug''s pluggin-classes.jar file?




I also receive a ‘class not found'' error message whenever I reference a class that is included in one of the external.jar files I have contained in my plugin-classes.jar file.  How can I ensure the external .jar files I have included in the plugin-classes.jar file are on the classpath ?




I have looked through the example code, but there is no example code that performs these tasks.




Thanks in advance for your help.




- Ken