我試圖打開使用SWT瀏覽器,並收到以下錯誤小程序嵌入網頁...困在這裏..can任何一個小程序嵌入頁面幫助運行從SWT瀏覽器(Mozilla的)
java.lang.NoClassDefFoundError: com/sun/deploy/services/Service
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at com.ivb.coep.vtu.plc.OpenBrowser.<init>(OpenBrowser.java:33)
at com.ivb.coep.vtu.plc.OpenBrowser.main(OpenBrowser.java:39)
Caused by: java.lang.ClassNotFoundException: com.sun.deploy.services.Service
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
我有這個chk並下載了xulrunner的正確版本,例如Mozilla Xul Runner 1.9.2.26,但是現在當我通過cmd註冊它時,它不會給出任何錯誤,但是在運行程序時我收到異常 – Ruby 2012-08-16 07:45:16
線程「main 「org.eclipse.swt.SWTError:沒有更多的句柄[無法檢測到註冊的XULRunner使用] \t at org.eclipse.swt.SWT.error(Unknown Source) \t at org.eclipse.swt.browser.Mozilla。創建(未知源) \t at org.eclipse.swt.browser.Browser。(未知來源) \t at com.ivb.coep.vtu.plc.OpenBrowser。 (OpenBrowser.java:18) \t at com.ivb.coep.vtu.plc.OpenBrowser.main(OpenBrowser.java:39) –
Ruby
2012-08-16 07:46:00
請查看http://www.eclipse.org/swt/faq.php# howdetectmozilla和這個http://www.eclipse.org/swt/faq.php#specifyxulrunner。嘗試使用顯式路徑到xulrunner,像這樣'-Dorg.eclipse.swt.browser.XULRunnerPath =/path/to/XulRunner' – 2012-08-16 08:00:42