Home » Newcomers » Newcomers » SWT Tutorial fails at RunAs (Could not load SWT library)(fails to load some swt*dlls from eclipse installation)
SWT Tutorial fails at RunAs (Could not load SWT library) [message #995532] |
Sun, 30 December 2012 06:28  |
Eclipse User |
|
|
|
Hello,
i've installed eclipse-rcp-juno-SR1-win32.zip and performed the Console Hello World and 90% of the SWT Hello World. The HelloWorldSWT compiles fine, but running the app results in:
SWT Sample
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-win32-4234 in java.library.path
no swt-win32 in java.library.path
Can't load library: C:\Dokumente und Einstellungen\ms\.swt\lib\win32\x86\swt-win32-4234.dll
Can't load library: C:\Dokumente und Einstellungen\ms\.swt\lib\win32\x86\swt-win32.dll
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:331)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:138)
at HelloWorldSWT.main(HelloWorldSWT.java:14)
i found the swt-win32-4234.dll in my exclipse installation and copied it somewhere into my PATH (i have c:\mydlls in the path, and thats where i copied the 2 files to).
Verzeichnis von P:\Programme\eclipse\configuration\org.eclipse.osgi\bundles\363\1\.cp
30.12.2012 10:24 438.272 swt-win32-4234.dll
30.12.2012 10:24 118.784 swt-gdip-win32-4234.dll
Now the HelloWorldSWT executes and opens a windows.
But now i am a bit confused if this is what i have to do? What am i missing?
Next i looked into the "Problems" view which shows me some warnings, and i am not sure, if this is ok:
Description Resource Path Location Type
The method removeEventListener(OleAutomation, GUID, int, OleListener) from the type OleControlSite is deprecated IE.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/browser line 1964 Java Problem
There is no 'jre.compilation.profile' build entry and the project has Java compliance preferences set build.properties /org.eclipse.swt.win32.win32.x86 line 1 Plug-in Problem
The method removeEventListener(OleAutomation, GUID, int, OleListener) from the type OleControlSite is deprecated IE.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/browser line 1963 Java Problem
The method removeEventListener(OleAutomation, GUID, int, OleListener) from the type OleControlSite is deprecated IE.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/browser line 1966 Java Problem
The method removeEventListener(OleAutomation, GUID, int, OleListener) from the type OleControlSite is deprecated IE.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/browser line 1965 Java Problem
The method removeEventListener(OleAutomation, GUID, int, OleListener) from the type OleControlSite is deprecated IE.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/browser line 1968 Java Problem
The method removeEventListener(OleAutomation, GUID, int, OleListener) from the type OleControlSite is deprecated IE.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/browser line 1967 Java Problem
The method removeEventListener(OleAutomation, GUID, int, OleListener) from the type OleControlSite is deprecated IE.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/browser line 1970 Java Problem
The method removeEventListener(OleAutomation, GUID, int, OleListener) from the type OleControlSite is deprecated IE.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/browser line 1969 Java Problem
The method removeEventListener(OleAutomation, GUID, int, OleListener) from the type OleControlSite is deprecated IE.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/browser line 1972 Java Problem
The method getPeer() from the type Component is deprecated SWT_AWT.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/awt line 196 Java Problem
The method removeEventListener(OleAutomation, GUID, int, OleListener) from the type OleControlSite is deprecated IE.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/browser line 1971 Java Problem
The method removeEventListener(OleAutomation, GUID, int, OleListener) from the type OleControlSite is deprecated IE.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/browser line 1974 Java Problem
The method removeEventListener(OleAutomation, GUID, int, OleListener) from the type OleControlSite is deprecated IE.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/browser line 1973 Java Problem
Build path specifies execution environment CDC-1.0/Foundation-1.0. There are no JREs installed in the workspace that are strictly compatible with this environment. org.eclipse.swt.win32.win32.x86 Build path JRE System Library Problem
Resource leak: 'jar' is never closed Library.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal line 185 Java Problem
Finally i tried to start the HelloWorldSWT from a command line.
so i changed to the Workspace\HelloWorldSWT\bin and run:
D:\LCo3\Workspace\HelloWorldSWT\bin>javaw HelloWorldSWT
but here i get some errors regarding SWT Classes:
D:\LCo3\Workspace\HelloWorldSWT\bin>Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display
at HelloWorldSWT.main(HelloWorldSWT.java:14)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Display
at java.net.URLClassLoader$1.run(Unknown Source)
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)
... 1 more
i guess i have to add something to my CLASSPATH. i tried:
D:\LCo3\Workspace\org.eclipse.swt.win32.win32.x86\bin;
and now "javaw HelloWorldSWT" opens the Windows.
Is this changed Classpath correkt?
thx very much for any help for a java/eclipse/swt newcomer.
mario.
|
|
| |
Re: SWT Tutorial fails at RunAs (Could not load SWT library) [message #998573 is a reply to message #997407] |
Thu, 10 January 2013 04:19  |
Eclipse User |
|
|
|
Hi Stephane,
First, thanks a lot for your reply. You fixed the problem i had with the SWT tutorial. As i have seen in the thread you referenced, the same problem had a lot of other people too. So are we all missing something in the tutorial description?
Regarding the other problem i have no idea how to fix this warning.
Description:
Build path specifies execution environment CDC-1.0/Foundation-1.0. There are no JREs installed in the workspace that are strictly compatible with this environment.
Source: org.eclipse.swt.win32.win32.x86
Creation Time: 30. Dezember 2012 11:33:47
I opened org.eclipse.swt.win32.win32.x86 -> JRT -> execution environment and changed it to JRE1.7 SE.
Now this above problem is gone, but now i have 164 warnings....
(thats why i write, that i have no idea how to fix this problem).
and: this org.clipse.swt.win32.win32.x86 is imported for the tutorial.
See the attached png for what i changed.
The warnings all occur somewhere inside java rt like:
Description Resource Path Location Type
Class is a raw type. References to generic type Class<T> should be parameterized Display.java /org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets line 1685 Java Problem
so the question is: how to correctly fix this problem?
best regards,
mario.
|
|
|
Goto Forum:
Current Time: Wed Jul 23 15:42:49 EDT 2025
Powered by FUDForum. Page generated in 0.08828 seconds
|