SWT 小程序:swt-win32-3650.dll 已加载到另一个类加载器中

发布于 2024-09-04 17:32:52 字数 847 浏览 6 评论 0原文

我有多个页面,其中包含用 SWT 编写的 java 小程序。问题是,小程序仅在第一页上加载,要将其加载到另一个页面上,我需要重新启动浏览器,否则我会收到以下错误:

Exception in thread "Thread-27" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
    no swt-win32-3650 in java.library.path
    no swt-win32 in java.library.path
    Native Library C:\Documents and Settings\xxx\Local Settings\Temp\swtlib-32\swt-win32-3650.dll already loaded in another classloader
    C:\Documents and Settings\xxx\Local Settings\Temp\swtlib-32\swt-win32.dll: %1 is not a valid Win32 application

at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)

我想知道,当带有小程序的浏览器页面关闭时,如何卸载 swt dll?

I have multiple pages with java applet written with SWT. The problem is, applet loads only on first page, to load it on another page i need restart browser, otherwise i get following error:

Exception in thread "Thread-27" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
    no swt-win32-3650 in java.library.path
    no swt-win32 in java.library.path
    Native Library C:\Documents and Settings\xxx\Local Settings\Temp\swtlib-32\swt-win32-3650.dll already loaded in another classloader
    C:\Documents and Settings\xxx\Local Settings\Temp\swtlib-32\swt-win32.dll: %1 is not a valid Win32 application

at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)

I wonder, how can I unload swt dlls when browser page with applet is closed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

热风软妹 2024-09-11 17:32:52

小程序类:

    @Override
    public void stop() {
        // do this to unload swt dlls
        System.exit(0);
    }

Applet class:

    @Override
    public void stop() {
        // do this to unload swt dlls
        System.exit(0);
    }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文