我有一个使用Swing制作的Java应用程序,并且使用了一个DJ Native Swing浏览器。当我尝试在OS
X上使用它NoClassDefFoundError
时,即使我添加了swt.jar,它也会一直抛出。有人可以告诉我我做错了吗?
这是我的堆栈跟踪。
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/eclipse/swt/SWT
at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.initialize_(SWTNativeInterface.java:213)
at chrriis.dj.nativeswing.swtimpl.NativeInterface.initialize(NativeInterface.java:71)
at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.open_(SWTNativeInterface.java:337)
at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:100)
at com.verve.visdashboard.AttendanceEntry.OpenBrowser_Pool(AttendanceEntry.java:763)
at com.verve.visdashboard.AttendanceEntry.AttendanceEntry_SubmitActionPerformed(AttendanceEntry.java:801)
at com.verve.visdashboard.AttendanceEntry.access$300(AttendanceEntry.java:36)
at com.verve.visdashboard.AttendanceEntry$9.actionPerformed(AttendanceEntry.java:682)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6414)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6179)
at java.awt.Container.processEvent(Container.java:2084)
at java.awt.Component.dispatchEventImpl(Component.java:4776)
at java.awt.Container.dispatchEventImpl(Container.java:2142)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4209)
at java.awt.Container.dispatchEventImpl(Container.java:2128)
at java.awt.Window.dispatchEventImpl(Window.java:2492)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:690)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205)
at java.awt.Dialog$1.run(Dialog.java:1049)
at java.awt.Dialog$3.run(Dialog.java:1101)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1099)
at java.awt.Component.show(Component.java:1615)
at java.awt.Component.setVisible(Component.java:1567)
at java.awt.Window.setVisible(Window.java:846)
at java.awt.Dialog.setVisible(Dialog.java:984)
at com.verve.visdashboard.Dashboard$202.run(Dashboard.java:9720)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWT
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 64 more
Booleann Value -- true
^CVerves-Mac-mini-1:app verve$ clear
漫长的等待之后,我终于找到了jar文件。
这里
http://download.eclipse.org/eclipse/downloads/drops4/S-4.4M5-201401231600/
在那里面
Mac OSX (Mac/Cocoa/x86_64)
这适用于64位Mac系统。我用那个swt.jar在mac中运行
DJ Native Swing 是一个跨平台的浏览器、Flash播放器、HTML编辑器和多媒体播放器组件。
问题内容: 我正在尝试将Angular.js客户端与Google Appengine上的webapp2一起使用。 为了解决SEO问题,该想法是使用无头浏览器运行javascript服务器端并将生成的html提供给搜寻器。 是否有在Google App Engine上运行的python无头浏览器? 问题答案: 现在,可以使用自定义运行时在App Engine Flex上完成此操作,因此我要添加此答案
另外,独立的程序对我来说很好。
问题内容: 什么是HSQLDB数据库的最佳浏览器工具? 问题答案: HSQL具有称为数据库管理器的内置GUI查询工具。在数据库文件的目录中运行: 然后将配置设置为: 允许我以非常方便的方式编辑所需内容。
问题内容: 请注意,和现在都弃用(如2018年6月的)。 我一直在寻找一种监视对象或变量更改的简便方法,我发现Mozilla浏览器支持,但IE不支持。所以我开始四处搜寻,看看是否有人写过类似的东西。 我唯一发现的就是jQuery插件,但是我不确定这是否是最好的方法。我当然在我的大多数项目中都使用jQuery,所以我并不担心jQuery方面的问题。 无论如何,问题是:有人可以向我展示该jQuery插
问题内容: 我需要一个易于使用的无头浏览器(对于Python和一般编程来说,我还是相当陌生的),它将允许我导航到页面,登录到需要Javascript的表单,然后通过以下方式刮取结果网页:搜索符合特定条件的结果,单击复选框,然后单击以下载文件。所有这些都需要Javascript。 我听说我想要一个无头的浏览器-要求/首选项是我能够从Python运行它,并且最好是生成的脚本可以由py2exe编译(我正