1避免使用绝对路径,使用打成jar文件后的插件的相对路径来调用本地资源。
譬如使用icon时
static Image image= AbstractUIPlugin.imageDescriptorFromPlugin("Plugin Name", "icon/icon.png").createImage();
Label temp=new label();
temp.setImage(temp);
2.利用Window shell 在后台调用默认浏览器,弹出窗口,打开指定网页
String cmd = "rundll32 url.dll,FileProtocolHandler http://xiezezhun.blogbus.com/ ,nil, nil, SW_SHOW";
Runtime.getRuntime().exec(cmd);
3.设置定时timer,定时刷新页面
int timer=1000*60*15;
parent.getDisplay().timerExec(timer, new Runnable()
{
public void run()
{
refresh();
System.out.print("I am refreshing");
parent.getDisplay().timerExec(timer, this);
}
});
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://xiezezhun.blogbus.com/logs/44005713.html