开发者

ImageDescriptor exception in RCP Application

I am a newbie to EclipseRCP and I am trying to get a product from EclipseRCP. In my program, I am loading some images(flags for language switches etc.). I am trying to load them in this way:

Image favcon= AbstractUIPlugin.imageDescriptorFromPlugin("HelloRCP", 
                  "images/configuration.jpg").createImage(display);

There are also some other place that I use this code snippet (I am defining a new Image instance at that time). I got a Null pointer exception at th开发者_开发问答at second usage of image descriptor. What can be reason for this situation ?


Are the images in images in the root directory?

Try using "/images/configuration.jpg" instead of "images/configuration.jpg"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜