Display.asyncExec()无法执行?

时间:2013-06-12 09:37:10

标签: multithreading swing swt osgi osgi-bundle

有2个独立的文件jar

        //this jar file is a plugin Eclipse
        mypack1.jar
        package mypack1;
        //this class is started by org.eclipse.ui.IStartup
        public class MyDialog extends JFrame{
                public String getValue(){
                    Display.asyncExec(new Runnable() {
                        public void run() {
                            //implementation
                        } //end method
                    });
                } //end function
         } //end class

        mypack2.jar
        package mypack2;
            public class MyClass{
                    public String myInvoke(){
                        //implement to invoke function getValue of class MyDialog
                    } //end function
            } //end class

当SWT浏览器控件执行javascript消息对话框时,方法Display.asyncExec可以正常情况下执行。

环境:Linux,SWT,OSGi包

请帮帮我。

0 个答案:

没有答案