Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipse-dev] Almost Crazy for org.eclipse.swt


See this SWT FAQ entry:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/faq.html#dll

In future, please ask user questions on the Eclipse newsgroup:
      news://news.eclipse.org/eclipse.tools
You need a password to access this newsgroup, so go to:
      http://www.eclipsecorner.org/newsgroups/index.html
to request one.


Carolyn



"Scott Stirling" <scottstirling@xxxxxxx>
Sent by: eclipse-dev-admin@xxxxxxxxxxx

05/19/02 05:21 PM
Please respond to eclipse-dev

       
        To:        <eclipse-dev@xxxxxxxxxxx>
        cc:        
        Subject:        RE: [eclipse-dev] Almost Crazy for org.eclipse.swt


Since the class you're using is trying to load a dll (native code),
you'll have to modify the load library path (which is like the classpath
for native libraries loaded by the JVM) to include the path to
swt-win32-2026.dll.  I don't know of any way to do this in Eclipse
through the UI.

If in a build file or command line, the JVM property to set is
java.library.path.  Or try using
System.load("Drive:/path/to/swt-win32-2026.dll")  in a static
initializer block.

There's probably some preferred way of doing this with Eclipse
libraries, but that's the general idea.

Scott Stirling

> -----Original Message-----
> From: eclipse-dev-admin@xxxxxxxxxxx
> [mailto:eclipse-dev-admin@xxxxxxxxxxx] On Behalf Of Bing.Li@xxxxxxx
> Sent: Sunday, May 19, 2002 2:24 PM
> To: eclipse-dev@xxxxxxxxxxx
> Subject: [eclipse-dev] Almost Crazy for org.eclipse.swt
>
>
> Dear all,
>
> I am a user of org.eclipse.swt. I am almost crazy for it. I
> tried to start a simplest HelloWorld code so as to show the
> GUI interface. But I was faided a lot of times!
>
> I got the following errors,
>
> java.lang.UnsatisfiedLinkError: no swt-win32-2026  
> (swt-win32-2026.dll) in java.library.path
>                  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1380)
>                  at java.lang.Runtime.loadLibrary0(Runtime.java:766)
>                  at java.lang.System.loadLibrary(System.java:849)
>                  at
> org.eclipse.swt.internal.Library.loadLibrary(Library.java:102)
>                  at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:37)
>                  at
> org.eclipse.swt.widgets.Display.internal_new_GC(Display.java:1049)
>                  at org.eclipse.swt.graphics.Device.init(Device.java:533)
>                  at org.eclipse.swt.widgets.Display.init(Display.java:1068)
>                  at org.eclipse.swt.graphics.Device.<init>(Device.java:82)
>                  at org.eclipse.swt.widgets.Display.<init>(Display.java:262)
>                  at org.eclipse.swt.widgets.Display.<init>(Display.java:258)
>                  at com.lblabs.swt.HelloWorld1.main(HelloWorld1.java:16)
> Exception in thread "main"
>
> Even if I followed the instructions of the examples in
> org.eclipse.swt.examples, the error is the same! Help me!
>
> The code is as follows,
>
> package com.lblabs.swt;
> import org.eclipse.swt.widgets.*;
> public class HelloWorld1
> {
>                  public static void main(String[] args)
>                  {
>                                   Display display = new Display();
>                                   Shell shell = new Shell(display);
>                                   shell.open();
>                                   while (!shell.isDisposed())
>                                   {
>                                                    if (!display.readAndDispatch())
>                                                    {
>                                                                     display.sleep();
>                                                    }
>                                   }
>                  }
> }
>
> The .classpath is as follows,
>
> <?xml version="1.0" encoding="UTF-8"?>
> <classpath>
>     <classpathentry kind="src" path=""/>
>     <classpathentry
> kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT"
> sourcepath="JRE_SRC"/>
>     <classpathentry kind="lib"
>
> path="D:/Eclipse/plugins/org.eclipse.swt/ws/win32/swt.jar"
> sourcepath="D:/Eclipse/plugins/org.eclipse.swt/ws/win32/swtsrc.zip"/>
>     <classpathentry kind="output" path=""/>
> </classpath>
>
>
> Thanks so much!
> Bing
>                  _________________
>                 |  How are you?  |_____    __
>                 |  I am Li Bing. |     |__|  |_________
>                 |________________| OK? |::|  | Need   /
>                 |                \.____|::|__| Help? <
>                 |                      \::/  \._______\
>    /\**/\       |   ___________________________________
>   ( o_o  )_     |__|http://www.public.asu.edu/~libing /
>    (u--u   \_)  |  |bing.li@xxxxxxx, 480-829-8492(H) /
>     (||___   )==\  |480-965-9038(L)602-743-9767(O)   \
>   ,dP"/b/=( /P"/b\ |__________________________________\
>   |8 || 8\=== || 8
>   `b,  ,P  `b,  ,P
>     """`     """`
>
>
> _______________________________________________
> eclipse-dev mailing list
> eclipse-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/eclips> e-dev
>


_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/eclipse-dev



Back to the top