Eclipse RCP应用程序无法关闭,需在进程栏关闭

it2024-11-06  13

!ENTRY org.eclipse.ui 4 0 2012-03-14 14:31:17.718 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NoClassDefFoundError: org/eclipse/ui/internal/WorkbenchWindow$5     at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:858)     at org.eclipse.jface.window.Window.handleShellCloseEvent(Window.java:741)     at org.eclipse.jface.window.Window$3.shellClosed(Window.java:687)     at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:98)     at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)     at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)     at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)     at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)     at org.eclipse.swt.widgets.Decorations.closeWidget(Decorations.java:308)     at org.eclipse.swt.widgets.Decorations.WM_CLOSE(Decorations.java:1677)     at org.eclipse.swt.widgets.Control.windowProc(Control.java:4530)     at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)     at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1610)     at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2061)     at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)     at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)     at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2525)     at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:498)     at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)     at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)     at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1610)     at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2061)     at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)     at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)     at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2525)     at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:498)     at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)     at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)     at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1610)     at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2061)     at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)     at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)     at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2530)     at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)     at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)     at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)     at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)     at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)     at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)     at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)     at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)     at com.geocompass.geosearch.Application.start(Application.java:56)     at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)     at java.lang.reflect.Method.invoke(Method.java:597)     at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)     at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)     at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

原因及改正方法:我重载ApplicationWorkbenchWindowAdvisor类的postWindowClose(),无意间注销了super.postWindowClose();方法。修改该方法时,确保先调用父类。

//    public void postWindowClose() { //        // TODO Auto-generated method stub //         super.postWindowClose();//是否注销此处导致无法关闭应用程序??

//  }

 

转载于:https://www.cnblogs.com/wuhenke/archive/2012/03/15/2397940.html

相关资源:数据结构—成绩单生成器
最新回复(0)