[問題] JFace 執行錯誤

看板java作者 (眠月)時間19年前 (2006/08/25 20:44), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
最近在學 JFace,遇到以下問題 我用的是 Eclipse 跟所附的 SWT/JFace 是 3.2.0 版 程式碼是這樣的 ====================================================== import org.eclipse.jface.window.*; import org.eclipse.swt.widgets.*; public class TestJFace extends Window { TestJFace() { super((Shell)null); } public static void main( String[] args ) { TestJFace demo = new TestJFace(); demo.setBlockOnOpen(true); demo.open(); Display.getCurrent().dispose(); } } ====================================================== 加入了 jar.. org.eclipse.core.runtime_3.2.0.v20060603.jar org.eclipse.jface_3.2.0.I20060605-1400.jar org.eclipse.swt.win32.win32.x86_3.2.0.v3232m.jar org.eclipse.ui.ide_3.2.0.I20060605-1400.jar org.eclipse.ui.win32_3.2.0.I20060605-1400.jar 使用了以下的 lib swt-awt-win32-3232.dll swt-gdip-win32-3232.dll swt-wgl-win32-3232.dll swt-win32-3232.dll 然後執行的結果是這個錯誤訊息 Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/core/commands/common/EventManager at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) (中略) at org.eclipse.jface.window.Window.createShell(Window.java:503) at org.eclipse.jface.window.Window.create(Window.java:425) at org.eclipse.jface.window.Window.open(Window.java:785) at TestJFace.main(TestJFace.java:15) 我不是很懂這個錯誤訊息是什麼意思, 所以也不明白要怎麼處理, 上 Google 搜索也找不到別人問這個問題, 別人的範例用的都是 3.1.0。 我如果用 3.1.0 的 dll 就可以執行。 已經卡了好幾天了, 請前輩指點,感恩。 -- To iterate is human, to recurse is divine. 遞迴只應天上有, 凡人該當用迴圈.   L. Peter Deutsch -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.114.78.32
文章代碼(AID): #14xl2Z6f (java)
文章代碼(AID): #14xl2Z6f (java)