Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT startup problem
SWT startup problem [message #453435] Tue, 05 April 2005 15:03 Go to next message
William is currently offline WilliamFriend
Messages: 23
Registered: July 2009
Junior Member
Hi.

I have downloaded the latest version of SWT:swt-3.0.2-win32.zip
And have added the VMArg:-Djava.library.path=C:\program1\eclipse\swt
------------------
dir C:\program1\eclipse\swt
Volume in drive C has no label.
Volume Serial Number is 3492-34FC

Directory of C:\program1\eclipse\swt

2005-04-05 15:51 <DIR> .
2005-04-05 15:51 <DIR> ..
2005-03-11 09:58 1 717 about.html
2005-03-11 09:58 548 javaw.exe.manifest
2005-03-11 09:58 32 768 swt-awt-win32-3064.dll
2005-03-11 09:58 307 200 swt-win32-3064.dll
2005-03-11 09:58 1 128 591 swt.jar
2005-03-11 09:58 1 196 131 swtsrc.zip

-----------------
I am trying to show one display with the following code:
public static void main(String[] args) {
Display pDisp = new Display();
Shell pShell = new Shell(pDisp);
pShell.setSize(200, 200);
pShell.pack();
pShell.open();
while ( !pShell.isDisposed() ) {
if ( !pDisp.readAndDispatch() )
pDisp.sleep();
}
pDisp.dispose();
} // main

But I still receive the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no
swt-win32-3064 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:10 0)
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:1781)
at org.eclipse.swt.graphics.Device.<init>(Device.java:100)
at org.eclipse.swt.widgets.Display.<init>(Display.java:356)
at org.eclipse.swt.widgets.Display.<init>(Display.java:352)
at ui.MainAppl.main(MainAppl.java:23)

Any ideer about what I am missing or doing wrong?

Best regards/William
Re: SWT startup problem [message #453440 is a reply to message #453435] Tue, 05 April 2005 15:27 Go to previous messageGo to next message
Christian Hauser is currently offline Christian HauserFriend
Messages: 189
Registered: July 2009
Senior Member
> I have downloaded the latest version of SWT:swt-3.0.2-win32.zip
> And have added the VMArg:-Djava.library.path=C:\program1\eclipse\swt
> ...
> But I still receive the following error:
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
> swt-win32-3064 in java.library.path

If you provide -Djava.library.path=C:\program1\eclipse\swt and within
that directory have your DLLs (as you said), then it should all work.

Are you starting this program from within Eclipse? Are you sure you
provide the VM argument and not a program argument? You seem to do all
right.

Christian
Re: SWT startup problem [message #453454 is a reply to message #453435] Wed, 06 April 2005 02:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aaa.domain.invalid

Hi,

Can you try this..copy the dll to say c:\windows\system32 (or any place
in your path) and see if it works as a temporary workaround?

-Chhil
William wrote:
> Hi.
>
> I have downloaded the latest version of SWT:swt-3.0.2-win32.zip
> And have added the VMArg:-Djava.library.path=C:\program1\eclipse\swt
> ------------------
> dir C:\program1\eclipse\swt
> Volume in drive C has no label.
> Volume Serial Number is 3492-34FC
>
> Directory of C:\program1\eclipse\swt
>
> 2005-04-05 15:51 <DIR> .
> 2005-04-05 15:51 <DIR> ..
> 2005-03-11 09:58 1 717 about.html
> 2005-03-11 09:58 548 javaw.exe.manifest
> 2005-03-11 09:58 32 768 swt-awt-win32-3064.dll
> 2005-03-11 09:58 307 200 swt-win32-3064.dll
> 2005-03-11 09:58 1 128 591 swt.jar
> 2005-03-11 09:58 1 196 131 swtsrc.zip
>
> -----------------
> I am trying to show one display with the following code:
> public static void main(String[] args) {
> Display pDisp = new Display();
> Shell pShell = new Shell(pDisp);
> pShell.setSize(200, 200);
> pShell.pack();
> pShell.open();
> while ( !pShell.isDisposed() ) {
> if ( !pDisp.readAndDispatch() )
> pDisp.sleep();
> }
> pDisp.dispose();
> } // main
>
> But I still receive the following error:
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
> swt-win32-3064 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:10 0)
> 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:1781)
> at org.eclipse.swt.graphics.Device.<init>(Device.java:100)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:356)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:352)
> at ui.MainAppl.main(MainAppl.java:23)
>
> Any ideer about what I am missing or doing wrong?
>
> Best regards/William
>
>
Re: SWT startup problem [message #453460 is a reply to message #453440] Wed, 06 April 2005 08:09 Go to previous messageGo to next message
William is currently offline WilliamFriend
Messages: 23
Registered: July 2009
Junior Member
I am running the program from Eclipse and I have tryed to moved the dll
files but still it dont start.

"Christian Hauser" <christian.hauser@dvbern.ch> wrote in message
news:d2uauq$c4u$1@news.eclipse.org...
>> I have downloaded the latest version of SWT:swt-3.0.2-win32.zip
>> And have added the VMArg:-Djava.library.path=C:\program1\eclipse\swt ...
>> But I still receive the following error:
>> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
>> swt-win32-3064 in java.library.path
>
> If you provide -Djava.library.path=C:\program1\eclipse\swt and within that
> directory have your DLLs (as you said), then it should all work.
>
> Are you starting this program from within Eclipse? Are you sure you
> provide the VM argument and not a program argument? You seem to do all
> right.
>
> Christian
Re: SWT startup problem [message #453584 is a reply to message #453440] Thu, 07 April 2005 15:47 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Check the debug view to see exactly what is being sent to java.exe.

In the Debug view of the debug perspective, select the terminated process
(expand the tree item and select the first sub node).
From the context menu (right mouse menu) select Properties.
Look at the Process Information and it will show you the command line it is
executing. Does this look right to you?

"Christian Hauser" <christian.hauser@dvbern.ch> wrote in message
news:d2uauq$c4u$1@news.eclipse.org...
>> I have downloaded the latest version of SWT:swt-3.0.2-win32.zip
>> And have added the VMArg:-Djava.library.path=C:\program1\eclipse\swt ...
>> But I still receive the following error:
>> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
>> swt-win32-3064 in java.library.path
>
> If you provide -Djava.library.path=C:\program1\eclipse\swt and within that
> directory have your DLLs (as you said), then it should all work.
>
> Are you starting this program from within Eclipse? Are you sure you
> provide the VM argument and not a program argument? You seem to do all
> right.
>
> Christian
Re: SWT startup problem [message #453601 is a reply to message #453435] Thu, 07 April 2005 23:07 Go to previous messageGo to next message
Nicholas Gauthier is currently offline Nicholas GauthierFriend
Messages: 14
Registered: July 2009
Junior Member
I too have gotten the same error. Maybe it has to do with the new dll
being embeded in the "org.eclipse.swt.win32_3.1.0.jar". Has anyone
gotten an swt program to run with this new jar configuration?

Thanks, Nick.



William wrote:

> Hi.
>
> I have downloaded the latest version of SWT:swt-3.0.2-win32.zip
> And have added the VMArg:-Djava.library.path=C:\program1\eclipse\swt
> ------------------
> dir C:\program1\eclipse\swt
> Volume in drive C has no label.
> Volume Serial Number is 3492-34FC
>
> Directory of C:\program1\eclipse\swt
>
> 2005-04-05 15:51 <DIR> .
> 2005-04-05 15:51 <DIR> ..
> 2005-03-11 09:58 1 717 about.html
> 2005-03-11 09:58 548 javaw.exe.manifest
> 2005-03-11 09:58 32 768 swt-awt-win32-3064.dll
> 2005-03-11 09:58 307 200 swt-win32-3064.dll
> 2005-03-11 09:58 1 128 591 swt.jar
> 2005-03-11 09:58 1 196 131 swtsrc.zip
>
> -----------------
> I am trying to show one display with the following code:
> public static void main(String[] args) {
> Display pDisp = new Display();
> Shell pShell = new Shell(pDisp);
> pShell.setSize(200, 200);
> pShell.pack();
> pShell.open();
> while ( !pShell.isDisposed() ) {
> if ( !pDisp.readAndDispatch() )
> pDisp.sleep();
> }
> pDisp.dispose();
> } // main
>
> But I still receive the following error:
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
> swt-win32-3064 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:10 0)
> 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:1781)
> at org.eclipse.swt.graphics.Device.<init>(Device.java:100)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:356)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:352)
> at ui.MainAppl.main(MainAppl.java:23)
>
> Any ideer about what I am missing or doing wrong?
>
> Best regards/William
>
>
Re: SWT startup problem [message #453616 is a reply to message #453601] Fri, 08 April 2005 06:49 Go to previous messageGo to next message
William is currently offline WilliamFriend
Messages: 23
Registered: July 2009
Junior Member
Hi.

It workes now and what I had to do was to unpack the jar file(swt.jar) to a
directory and include that directory in the classpath.

Best regards/William

"Nicholas Gauthier" <nicholas.gauthier@utah.edu> wrote in message
news:d34emp$qgu$1@news.eclipse.org...
>I too have gotten the same error. Maybe it has to do with the new dll
>being embeded in the "org.eclipse.swt.win32_3.1.0.jar". Has anyone gotten
>an swt program to run with this new jar configuration?
>
> Thanks, Nick.
>
>
>
> William wrote:
>
>> Hi.
>>
>> I have downloaded the latest version of SWT:swt-3.0.2-win32.zip
>> And have added the
>> VMArg:-Djava.library.path=C:\program1\eclipse\swt ------------------
>> dir C:\program1\eclipse\swt
>> Volume in drive C has no label.
>> Volume Serial Number is 3492-34FC
>>
>> Directory of C:\program1\eclipse\swt
>>
>> 2005-04-05 15:51 <DIR> .
>> 2005-04-05 15:51 <DIR> ..
>> 2005-03-11 09:58 1 717 about.html
>> 2005-03-11 09:58 548 javaw.exe.manifest
>> 2005-03-11 09:58 32 768 swt-awt-win32-3064.dll
>> 2005-03-11 09:58 307 200 swt-win32-3064.dll
>> 2005-03-11 09:58 1 128 591 swt.jar
>> 2005-03-11 09:58 1 196 131 swtsrc.zip
>>
>> -----------------
>> I am trying to show one display with the following code:
>> public static void main(String[] args) {
>> Display pDisp = new Display();
>> Shell pShell = new Shell(pDisp);
>> pShell.setSize(200, 200);
>> pShell.pack();
>> pShell.open();
>> while ( !pShell.isDisposed() ) {
>> if ( !pDisp.readAndDispatch() )
>> pDisp.sleep();
>> }
>> pDisp.dispose();
>> } // main
>>
>> But I still receive the following error:
>> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
>> swt-win32-3064 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:10 0)
>> 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:1781)
>> at org.eclipse.swt.graphics.Device.<init>(Device.java:100)
>> at org.eclipse.swt.widgets.Display.<init>(Display.java:356)
>> at org.eclipse.swt.widgets.Display.<init>(Display.java:352)
>> at ui.MainAppl.main(MainAppl.java:23)
>>
>> Any ideer about what I am missing or doing wrong?
>>
>> Best regards/William
>>
Re: SWT startup problem (Swt installation problem) [message #453617 is a reply to message #453435] Fri, 08 April 2005 08:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: f.bollaert.xxx.com

I am having a similar problem with swt installation.

Here is what I have done:

I am developiong with WSDD 5.7.1
on the pda I installed both Foundation, and Personal Profile, using the
cab files.

The pda is a pocket pc with
Microsoft Pocket PC Version 4.20.1081 installed.
Intel(R) PXA255

I have downloaded:

Windows CE (ARM PocketPC, J2ME profile)
swt-3.0.1-win32-ce-arm-ppc-j2me.zip

which contains:

11/03/2005 09:59 1,717 about.html
11/03/2005 09:59 145,408 swt-win32-3064.dll
11/03/2005 09:59 145,408 swt-win32.dll
11/03/2005 09:59 486,479 swt.jar
11/03/2005 09:59 752,617 swtsrc.zip


I have copied "swt-win32-3064.dll" into the

\Program Files\J9\FOUN10\bin
\Program Files\J9\PPRO10\bin


Also swt.jar is copied into:
\install

The start file looks like this:
139#"\Program Files\J9\FOUN10\bin\j9.exe" "-jcl:foun10"
"-cp:\install\HelloWorld.jar;\install\swt.jar" "HelloWorld"


And this is the exception I get:

(W)EXEL0051

WARNING: The command line argument "-cp:" has been deprecated.

WARNING: Use "-classpath <path>" or "-cp <path>".

Exception in thread "main" java.lang.UnsatisfiedLinkError:
org/eclipse/swt/internal/win32/OS.GetVersionExW(Lorg/eclipse /swt/internal/win32/OSVERSIONINFOW;)Z

at org.eclipse.swt.internal.win32.OS.<clinit>(Unknown Source)

at java.lang.Class.initializeImpl(Native Method)

at java.lang.Class.initialize(Unknown Source)

at org.eclipse.swt.graphics.Device.init(Unknown Source)

at org.eclipse.swt.widgets.Display.init(Unknown Source)

at org.eclipse.swt.graphics.Device.<init>(Unknown Source)

at org.eclipse.swt.widgets.Display.<init>(Unknown Source)

at org.eclipse.swt.widgets.Display.<init>(Unknown Source)

at HelloWorld.main(Unknown Source)




The HelloWorld class you can find in "A small cup of SWT" works fine on
Personal Profile.
But when I extend the example with a tree, it crashes on this error again.

Extracting the jar file does not do the trick for me.

Any help would be soo much appreciated.
Re: SWT startup problem (Swt installation problem) [message #453741 is a reply to message #453617] Fri, 08 April 2005 13:06 Go to previous messageGo to next message
Stef van Dijk is currently offline Stef van DijkFriend
Messages: 31
Registered: July 2009
Member
You're likely running into a conflict between the swt.jar you've put on the
path and the swt which in embedded within PPro and on the bootclasspath. So
are you trying to build a PPro app or an SWT app? You mention using a tree
which is not part of PPro, so if you're building an SWT app, why have PPro
on the path at all?

Stef

"Frankie Bollaert" <f.bollaert@xxx.com> wrote in message
news:e2e4b142c2d52b2e757bc9a59058dfd8$1@www.eclipse.org...
> I am having a similar problem with swt installation.
>
> Here is what I have done:
>
> I am developiong with WSDD 5.7.1
> on the pda I installed both Foundation, and Personal Profile, using the
> cab files.
>
> The pda is a pocket pc with
> Microsoft Pocket PC Version 4.20.1081 installed.
> Intel(R) PXA255
>
> I have downloaded:
>
> Windows CE (ARM PocketPC, J2ME profile)
> swt-3.0.1-win32-ce-arm-ppc-j2me.zip
>
> which contains:
>
> 11/03/2005 09:59 1,717 about.html
> 11/03/2005 09:59 145,408 swt-win32-3064.dll
> 11/03/2005 09:59 145,408 swt-win32.dll
> 11/03/2005 09:59 486,479 swt.jar
> 11/03/2005 09:59 752,617 swtsrc.zip
>
>
> I have copied "swt-win32-3064.dll" into the
>
> \Program Files\J9\FOUN10\bin
> \Program Files\J9\PPRO10\bin
>
>
> Also swt.jar is copied into:
> \install
>
> The start file looks like this:
> 139#"\Program Files\J9\FOUN10\bin\j9.exe" "-jcl:foun10"
> "-cp:\install\HelloWorld.jar;\install\swt.jar" "HelloWorld"
>
>
> And this is the exception I get:
>
> (W)EXEL0051
>
> WARNING: The command line argument "-cp:" has been deprecated.
>
> WARNING: Use "-classpath <path>" or "-cp <path>".
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError:
>
org/eclipse/swt/internal/win32/OS.GetVersionExW(Lorg/eclipse /swt/internal/wi
n32/OSVERSIONINFOW;)Z
>
> at org.eclipse.swt.internal.win32.OS.<clinit>(Unknown Source)
>
> at java.lang.Class.initializeImpl(Native Method)
>
> at java.lang.Class.initialize(Unknown Source)
>
> at org.eclipse.swt.graphics.Device.init(Unknown Source)
>
> at org.eclipse.swt.widgets.Display.init(Unknown Source)
>
> at org.eclipse.swt.graphics.Device.<init>(Unknown Source)
>
> at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
>
> at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
>
> at HelloWorld.main(Unknown Source)
>
>
>
>
> The HelloWorld class you can find in "A small cup of SWT" works fine on
> Personal Profile.
> But when I extend the example with a tree, it crashes on this error again.
>
> Extracting the jar file does not do the trick for me.
>
> Any help would be soo much appreciated.
>
Re: SWT startup problem (Swt installation problem) [message #453743 is a reply to message #453741] Fri, 08 April 2005 13:25 Go to previous messageGo to next message
Stef van Dijk is currently offline Stef van DijkFriend
Messages: 31
Registered: July 2009
Member
Oh, my mistake. I see you're original problem was using jcl:foun10, so no
PPro. But what I said about a conflict does hold true for your second
problem when you tried extending the example with a tree.
Not sure why your setup isn't working, but you might try adding
a -Djava.library.path="\Program Files\J9\FOUN10\bin" to explicitly point to
the SWT dll. I assume in your setup that the foundation classes are in
"\Program Files\J9\FOUN10\lib\jclFoundation10", right?

BTW, since you're running on CDC/Foundation, you don't actually need the
"j2me" version of the SWT for PPC code. It's a bit of a misnomer. The "j2me"
version is really if you're running on CLDC. But that shouldn't be the cause
of your problem.

Stef

"Stef van Dijk" <not-me@not-here.com> wrote in message
news:d35vp5$of0$1@news.eclipse.org...
> You're likely running into a conflict between the swt.jar you've put on
the
> path and the swt which in embedded within PPro and on the bootclasspath.
So
> are you trying to build a PPro app or an SWT app? You mention using a tree
> which is not part of PPro, so if you're building an SWT app, why have PPro
> on the path at all?
>
> Stef
>
> "Frankie Bollaert" <f.bollaert@xxx.com> wrote in message
> news:e2e4b142c2d52b2e757bc9a59058dfd8$1@www.eclipse.org...
> > I am having a similar problem with swt installation.
> >
> > Here is what I have done:
> >
> > I am developiong with WSDD 5.7.1
> > on the pda I installed both Foundation, and Personal Profile, using the
> > cab files.
> >
> > The pda is a pocket pc with
> > Microsoft Pocket PC Version 4.20.1081 installed.
> > Intel(R) PXA255
> >
> > I have downloaded:
> >
> > Windows CE (ARM PocketPC, J2ME profile)
> > swt-3.0.1-win32-ce-arm-ppc-j2me.zip
> >
> > which contains:
> >
> > 11/03/2005 09:59 1,717 about.html
> > 11/03/2005 09:59 145,408 swt-win32-3064.dll
> > 11/03/2005 09:59 145,408 swt-win32.dll
> > 11/03/2005 09:59 486,479 swt.jar
> > 11/03/2005 09:59 752,617 swtsrc.zip
> >
> >
> > I have copied "swt-win32-3064.dll" into the
> >
> > \Program Files\J9\FOUN10\bin
> > \Program Files\J9\PPRO10\bin
> >
> >
> > Also swt.jar is copied into:
> > \install
> >
> > The start file looks like this:
> > 139#"\Program Files\J9\FOUN10\bin\j9.exe" "-jcl:foun10"
> > "-cp:\install\HelloWorld.jar;\install\swt.jar" "HelloWorld"
> >
> >
> > And this is the exception I get:
> >
> > (W)EXEL0051
> >
> > WARNING: The command line argument "-cp:" has been deprecated.
> >
> > WARNING: Use "-classpath <path>" or "-cp <path>".
> >
> > Exception in thread "main" java.lang.UnsatisfiedLinkError:
> >
>
org/eclipse/swt/internal/win32/OS.GetVersionExW(Lorg/eclipse /swt/internal/wi
> n32/OSVERSIONINFOW;)Z
> >
> > at org.eclipse.swt.internal.win32.OS.<clinit>(Unknown Source)
> >
> > at java.lang.Class.initializeImpl(Native Method)
> >
> > at java.lang.Class.initialize(Unknown Source)
> >
> > at org.eclipse.swt.graphics.Device.init(Unknown Source)
> >
> > at org.eclipse.swt.widgets.Display.init(Unknown Source)
> >
> > at org.eclipse.swt.graphics.Device.<init>(Unknown Source)
> >
> > at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
> >
> > at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
> >
> > at HelloWorld.main(Unknown Source)
> >
> >
> >
> >
> > The HelloWorld class you can find in "A small cup of SWT" works fine on
> > Personal Profile.
> > But when I extend the example with a tree, it crashes on this error
again.
> >
> > Extracting the jar file does not do the trick for me.
> >
> > Any help would be soo much appreciated.
> >
>
>
Re: SWT startup problem [message #453749 is a reply to message #453616] Fri, 08 April 2005 15:00 Go to previous messageGo to next message
Nicholas Gauthier is currently offline Nicholas GauthierFriend
Messages: 14
Registered: July 2009
Junior Member
So every time I install a new version of eclipse I have to go find the
swt.jar, unpack it, and add it to the classpath? Seems sort of silly to
me, isn't that why there is a "Run->SWT Application" ? In addition my
RCP application works fine, leading me to believe that eclipse should
handle the dependency for me if I am running it as a rpc-application.

Nick.


William wrote:
> Hi.
>
> It workes now and what I had to do was to unpack the jar file(swt.jar) to a
> directory and include that directory in the classpath.
>
> Best regards/William
>
> "Nicholas Gauthier" <nicholas.gauthier@utah.edu> wrote in message
> news:d34emp$qgu$1@news.eclipse.org...
>
>>I too have gotten the same error. Maybe it has to do with the new dll
>>being embeded in the "org.eclipse.swt.win32_3.1.0.jar". Has anyone gotten
>>an swt program to run with this new jar configuration?
>>
>>Thanks, Nick.
>>
>>
>>
>>William wrote:
>>
>>
>>>Hi.
>>>
>>>I have downloaded the latest version of SWT:swt-3.0.2-win32.zip
>>>And have added the
>>>VMArg:-Djava.library.path=C:\program1\eclipse\swt ------------------
>>>dir C:\program1\eclipse\swt
>>>Volume in drive C has no label.
>>>Volume Serial Number is 3492-34FC
>>>
>>>Directory of C:\program1\eclipse\swt
>>>
>>>2005-04-05 15:51 <DIR> .
>>>2005-04-05 15:51 <DIR> ..
>>>2005-03-11 09:58 1 717 about.html
>>>2005-03-11 09:58 548 javaw.exe.manifest
>>>2005-03-11 09:58 32 768 swt-awt-win32-3064.dll
>>>2005-03-11 09:58 307 200 swt-win32-3064.dll
>>>2005-03-11 09:58 1 128 591 swt.jar
>>>2005-03-11 09:58 1 196 131 swtsrc.zip
>>>
>>>-----------------
>>>I am trying to show one display with the following code:
>>> public static void main(String[] args) {
>>> Display pDisp = new Display();
>>> Shell pShell = new Shell(pDisp);
>>> pShell.setSize(200, 200);
>>> pShell.pack();
>>> pShell.open();
>>> while ( !pShell.isDisposed() ) {
>>> if ( !pDisp.readAndDispatch() )
>>> pDisp.sleep();
>>> }
>>> pDisp.dispose();
>>> } // main
>>>
>>>But I still receive the following error:
>>>Exception in thread "main" java.lang.UnsatisfiedLinkError: no
>>>swt-win32-3064 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:10 0)
>>> 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:1781)
>>> at org.eclipse.swt.graphics.Device.<init>(Device.java:100)
>>> at org.eclipse.swt.widgets.Display.<init>(Display.java:356)
>>> at org.eclipse.swt.widgets.Display.<init>(Display.java:352)
>>> at ui.MainAppl.main(MainAppl.java:23)
>>>
>>>Any ideer about what I am missing or doing wrong?
>>>
>>>Best regards/William
>>>
>
>
Re: SWT startup problem (Swt installation problem) [message #453816 is a reply to message #453743] Mon, 11 April 2005 07:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lemail.address.com

Hello Stef,

I have an application running on the pda with swt-win32-3062.dll. I just
can’t seem to get a newer version to work. I have tried both
swt-win32-3064.dll and swt-win32-3111.dll.

To make sure that I did not have a conflict between the jar file and the
dll I first deleted all dlls in the \Windows directory and in the \Program
files\j9\foun10\bin directory. Then I copied the swt-win32-3064.dll in
the \Program files\j9\foun10\bin.

I created a new jar swt and added a print out statement in the class

org.eclipse.swt.internal.Library

public static void loadLibrary (String name) {
System.out.println( " version= " + getVersion() );
}

That way I could clearly see which jar was used. At runtime I could see
that the correct jar was being used. It printed: “version= 4064”

But still I am getting the UnsatisfiedLinkErrors. I hope you can help.

Frankie

Ps: Could you tell me how users are supposed to report back bugs? Is that
done into bugzilla directly? I have noticed a difference in events being
generated on pda and on xp which I would like to report.
Re: SWT startup problem (Swt installation problem) [message #453820 is a reply to message #453816] Mon, 11 April 2005 12:58 Go to previous messageGo to next message
Stef van Dijk is currently offline Stef van DijkFriend
Messages: 31
Registered: July 2009
Member
Not sure what else to suggest. Certainly sounds like you're doing the right
things. Unless maybe you're using the win32 x86 dll as opposed to the arm
version, I don't know why it's not working for you.
And yes, you would report bugs directly into bugzilla.

Stef

"Frankie Bollaert" <lemail@address.com> wrote in message
news:8e46bc1a2020b3425ae73a20fb0e5b24$1@www.eclipse.org...
> Hello Stef,
>
> I have an application running on the pda with swt-win32-3062.dll. I just
> can
Re: SWT startup problem [message #453837 is a reply to message #453749] Mon, 11 April 2005 20:08 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
The Run->SWT Application feature got added for M5 then broken for M6 and
will be fixed for M7 or removed from the product. An RCP app uses OSGi to
find the SWT DLL's. That's why it works for RCP.

"Nicholas Gauthier" <nicholas.gauthier@utah.edu> wrote in message
news:d366ie$3ft$1@news.eclipse.org...
> So every time I install a new version of eclipse I have to go find the
> swt.jar, unpack it, and add it to the classpath? Seems sort of silly to
> me, isn't that why there is a "Run->SWT Application" ? In addition my
> RCP application works fine, leading me to believe that eclipse should
> handle the dependency for me if I am running it as a rpc-application.
>
> Nick.
>
>
> William wrote:
> > Hi.
> >
> > It workes now and what I had to do was to unpack the jar file(swt.jar)
to a
> > directory and include that directory in the classpath.
> >
> > Best regards/William
> >
> > "Nicholas Gauthier" <nicholas.gauthier@utah.edu> wrote in message
> > news:d34emp$qgu$1@news.eclipse.org...
> >
> >>I too have gotten the same error. Maybe it has to do with the new dll
> >>being embeded in the "org.eclipse.swt.win32_3.1.0.jar". Has anyone
gotten
> >>an swt program to run with this new jar configuration?
> >>
> >>Thanks, Nick.
> >>
> >>
> >>
> >>William wrote:
> >>
> >>
> >>>Hi.
> >>>
> >>>I have downloaded the latest version of SWT:swt-3.0.2-win32.zip
> >>>And have added the
> >>>VMArg:-Djava.library.path=C:\program1\eclipse\swt ------------------
> >>>dir C:\program1\eclipse\swt
> >>>Volume in drive C has no label.
> >>>Volume Serial Number is 3492-34FC
> >>>
> >>>Directory of C:\program1\eclipse\swt
> >>>
> >>>2005-04-05 15:51 <DIR> .
> >>>2005-04-05 15:51 <DIR> ..
> >>>2005-03-11 09:58 1 717 about.html
> >>>2005-03-11 09:58 548 javaw.exe.manifest
> >>>2005-03-11 09:58 32 768 swt-awt-win32-3064.dll
> >>>2005-03-11 09:58 307 200 swt-win32-3064.dll
> >>>2005-03-11 09:58 1 128 591 swt.jar
> >>>2005-03-11 09:58 1 196 131 swtsrc.zip
> >>>
> >>>-----------------
> >>>I am trying to show one display with the following code:
> >>> public static void main(String[] args) {
> >>> Display pDisp = new Display();
> >>> Shell pShell = new Shell(pDisp);
> >>> pShell.setSize(200, 200);
> >>> pShell.pack();
> >>> pShell.open();
> >>> while ( !pShell.isDisposed() ) {
> >>> if ( !pDisp.readAndDispatch() )
> >>> pDisp.sleep();
> >>> }
> >>> pDisp.dispose();
> >>> } // main
> >>>
> >>>But I still receive the following error:
> >>>Exception in thread "main" java.lang.UnsatisfiedLinkError: no
> >>>swt-win32-3064 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:10 0)
> >>> 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:1781)
> >>> at org.eclipse.swt.graphics.Device.<init>(Device.java:100)
> >>> at org.eclipse.swt.widgets.Display.<init>(Display.java:356)
> >>> at org.eclipse.swt.widgets.Display.<init>(Display.java:352)
> >>> at ui.MainAppl.main(MainAppl.java:23)
> >>>
> >>>Any ideer about what I am missing or doing wrong?
> >>>
> >>>Best regards/William
> >>>
> >
> >
Re: SWT startup problem [message #454204 is a reply to message #453616] Tue, 19 April 2005 01:04 Go to previous message
Eclipse UserFriend
Originally posted by: socrel.gmail.com

William wrote:

> Hi.

> It workes now and what I had to do was to unpack the jar file(swt.jar) to a
> directory and include that directory in the classpath.

Tried unziping swt.jar and adding dir to classpath, but this did not work.
Added dir for swt dlls to Windows system path and restarted Eclipse -
worked.
Previous Topic:Removing individual TreeItems from a Tree
Next Topic:How to get the raw content that is rendered by org.eclipse.swt.browser.Browser
Goto Forum:
  


Current Time: Fri Apr 19 22:51:25 GMT 2024

Powered by FUDForum. Page generated in 0.04071 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top