Running AWT from eclipse

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Running AWT from eclipse

Postby middy » Tue Nov 02, 2004 5:55 am

Well I get this error

Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3101 in java.library.path

Now before you say that I have to have the swt dll in my path. I also added this to my VM args -Djava.library.path=C:\nativelibs"

Her is the latest version of native SWT swt-win32-3106.dll

This VM argument works with another project requiring another dll
middy
 
Posts: 3
Joined: Tue Nov 02, 2004 5:52 am

Re: Running AWT from eclipse

Postby Eric Clayberg » Tue Nov 02, 2004 6:40 am

middy wrote:Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3101 in java.library.path
Now before you say that I have to have the swt dll in my path.

Unfortunately, that is exactly what I am going to say.

That error means only one thing. The SWT DLL is not on your path. Resolve that problem, and you will be fine.

If you want a quick solution, copy it into your windows/system32 directory.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

bugger

Postby middy » Tue Nov 02, 2004 7:09 am

Well I did try that already :-(

Here is the full error
Code: Select all

Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3101 in java.library.path
   at java.lang.ClassLoader.loadLibrary(Unknown Source)
   at java.lang.Runtime.loadLibrary0(Unknown Source)
   at java.lang.System.loadLibrary(Unknown Source)
   at org.eclipse.swt.internal.Library.loadLibrary(Library.java:100)
   at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:18)
   at org.eclipse.swt.graphics.Device.init(Device.java:564)
   at org.eclipse.swt.widgets.Display.init(Display.java:1780)
   at org.eclipse.swt.graphics.Device.<init>(Device.java:100)
   at org.eclipse.swt.widgets.Display.<init>(Display.java:355)
   at org.eclipse.swt.widgets.Display.<init>(Display.java:351)
   at org.eclipse.swt.widgets.Display.getDefault(Display.java:993)
   at Testvindue.open(Testvindue.java:26)
   at Testvindue.main(Testvindue.java:22)
[/code]
middy
 
Posts: 3
Joined: Tue Nov 02, 2004 5:52 am

Re: bugger

Postby Eric Clayberg » Tue Nov 02, 2004 7:26 am

middy wrote:Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3101 in java.library.path

It looks like you are using the wrong version of the DLL. Note that the error refers to the 3101 version, and you earlier mentioned the 3106 version. Each version of Eclipse comes with a different version of that DLL which is matched to the corresponding SWT jar file. You can't mix and match them.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

allright

Postby middy » Tue Nov 02, 2004 7:39 am

I assumed that it was your designer that requested the 3101 version., not eclipse.

I checked eclipse 3.1 M1 AWT and there is was. I was convinced I had M2


Sorry for the trouble
middy
 
Posts: 3
Joined: Tue Nov 02, 2004 5:52 am

Re: allright

Postby Eric Clayberg » Tue Nov 02, 2004 7:49 am

middy wrote:I assumed that it was your designer that requested the 3101 version., not eclipse.

Designer doesn't impose any runtime requirements. It will work with any version of Eclipse and SWT from v2.0 on.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby bnblazer » Tue Nov 02, 2004 11:46 am

I just came in here looking for a solution to a similar error. My difference is that I am getting that error on a Mac running 10.3.5. Why should it care if I have a Win 32 dll?

Thanks,
Brian
bnblazer
 
Posts: 1
Joined: Tue Nov 02, 2004 11:42 am

Postby Eric Clayberg » Tue Nov 02, 2004 3:15 pm

bnblazer wrote:I just came in here looking for a solution to a similar error. My difference is that I am getting that error on a Mac running 10.3.5. Why should it care if I have a Win 32 dll?

You don't need the Windows version of the DLL, but you might need the Mac equivalent. In general, if you are having problems getting SWT apps to startup at runtime, those questions should be posted to the Eclipse SWT newsgroup.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest