java - Images are not appearing in RCP application after exporting as a product -


i have rcp application, in have added images icons. below method method adding icons on buttons:

public static void seticonforbutton(button button, display d, bundle bundle, string path) {     inputstream = null;     try {         = filelocator.openstream(bundle, new path(path), false);         image image = new image(d, is);         button.setimage(image);     } catch (ioexception e1) {         e1.printstacktrace();     } {         try {             if (is != null) {                 is.close();             }         } catch (exception e1) {             e1.printstacktrace();         }     } } 

where,

button button --> button on need add icons,
display d --> current display,
bundle bundle --> frameworkutil.getbundle(getclass());,
string path --> path of icon.(for example - /icons/expandall.gif)

all images stored in icons folder directly under root project folder.

note: have no other references anywhere else in whole project of icons folder.

have added icons in build.properties ? must open plugin.xml instance, go build tab, , check "icons" folder in "binary build" section indicates folder bundled in rcp application or plugin.

hope helps.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -