开发者

ImageDescriptor exception in RCP Application

开发者 https://www.devze.com 2023-04-05 16:46 出处:网络
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:

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

精彩评论

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

关注公众号