Reputation: 1823
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?
Upvotes: 0
Views: 1322
Reputation: 1823
Applet class:
@Override
public void stop() {
// do this to unload swt dlls
System.exit(0);
}
Upvotes: 2