Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » WebStart SWT java.library.path problem
WebStart SWT java.library.path problem [message #458686] Tue, 19 July 2005 11:52 Go to next message
mr. burns is currently offline mr. burnsFriend
Messages: 402
Registered: July 2009
Senior Member
Hello,

I try to make an application running using WebStart. On my machine where I
use Eclipse, everything works well I can run my application by clicking a
link withi a HTML page.
But If I do on another machine I get following error if I click the
launch-link on my webpage:

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: no swt-win32-3062 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: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 p1.mySQLView.main(mySQLView.java:162)
... 11 more

So do I have to put the SWT source file into a folder and pass this folder
as as property to the VM?
Do I also have to provide the swt.dll?
I thought that WebStart installs everything whats necessary no make my
application running on the other machine.
WebStart makes no sense if I do have to install the SWT sources and DLLs
manually, or do I something wrong?
How can I make WebStart also installing the DLL and the SWT source file?
So what are the steps to make my application run on other machines, that all
whats necessary comes from WebStart?

Thanks for any help!
Re: WebStart SWT java.library.path problem [message #458687 is a reply to message #458686] Tue, 19 July 2005 12:15 Go to previous messageGo to next message
mr. burns is currently offline mr. burnsFriend
Messages: 402
Registered: July 2009
Senior Member
Hello,

I found that the swt-win32-xxxx.dll was missing on the target machine.
But how can I deploy a DLL using WebStart?

Thanks for further information!
Re: WebStart SWT java.library.path problem [message #458712 is a reply to message #458686] Tue, 19 July 2005 20:14 Go to previous messageGo to next message
Guy Nirpaz is currently offline Guy NirpazFriend
Messages: 8
Registered: July 2009
Junior Member
In order to make SWT work with JWS you need to:

1. Package your code in jar files
2. Package swt.dll in jar file
3. add swt.jar
4. sign all the jars

Edit the .jnlp file to refer to all those jars, something like:

<resources>
<j2se version="1.4+"/>
<jar href="http://localhost/jws/gface_0.8.5.jar" download="eager"
main="false"/>
<jar href="http://localhost/jws/gface-demo_0.8.5.jar"
download="eager" main="true"/>
</resources>
<resources os="Windows">
<jar href="http://gface.sourceforge.net/jws/win32/swt.jar"
download="eager" main="false" />
<nativelib
href="http://gface.sourceforge.net/jws/win32/swt-win-lib.jar"
download="eager" main="false"/>
</resources>
<resources os="Linux">
<jar href="http://gface.sourceforge.net/jws/linux/swt.jar"
download="eager" main="false" />
<nativelib
href="http://gface.sourceforge.net/jws/linux/swt-linux-lib.jar"
download="eager" main="false"/>
</resources>
<application-desc
main-class="com.gface.controls.samples.DemoApplication"/>

A good tutorial can be found at:
http://www-128.ibm.com/developerworks/opensource/library/os- jws/

- nirpaz

Mr. Burns wrote:
> Hello,
>
> I try to make an application running using WebStart. On my machine where I
> use Eclipse, everything works well I can run my application by clicking a
> link withi a HTML page.
> But If I do on another machine I get following error if I click the
> launch-link on my webpage:
>
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at com.sun.javaws.Launcher.executeApplication(Unknown Source)
> at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
> at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
> at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
> at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
> at com.sun.javaws.Launcher.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.UnsatisfiedLinkError: no swt-win32-3062 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: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 p1.mySQLView.main(mySQLView.java:162)
> ... 11 more
>
> So do I have to put the SWT source file into a folder and pass this folder
> as as property to the VM?
> Do I also have to provide the swt.dll?
> I thought that WebStart installs everything whats necessary no make my
> application running on the other machine.
> WebStart makes no sense if I do have to install the SWT sources and DLLs
> manually, or do I something wrong?
> How can I make WebStart also installing the DLL and the SWT source file?
> So what are the steps to make my application run on other machines, that all
> whats necessary comes from WebStart?
>
> Thanks for any help!
>
>
Re: WebStart SWT java.library.path problem [message #458872 is a reply to message #458687] Mon, 25 July 2005 12:56 Go to previous message
Bernhard Fastenrath is currently offline Bernhard FastenrathFriend
Messages: 10
Registered: July 2009
Junior Member
You can add the following lines to your JNLP file:

<resources os="Windows 2000">
<jar href="org.eclipse.swt.win32.win32.x86_3.1.0.jar"/>
<nativelib
href="org.eclipse.swt.win32.win32.x86_3.1.0.jar"/>
</resources>
<resources os="Linux" arch="i386">
<jar href="org.eclipse.swt.gtk.linux.x86_3.1.0.jar"/>
<nativelib href="org.eclipse.swt.gtk.linux.x86_3.1.0.jar"/>
</resources>

The JAR files must contain the required .DLLs or .SO libraries
and the JAR files must be signed.

Mr. Burns wrote:
> Hello,
>
> I found that the swt-win32-xxxx.dll was missing on the target machine.
> But how can I deploy a DLL using WebStart?
>
> Thanks for further information!
Previous Topic:Search plugin only in one specific perspective?
Next Topic:Combo clearSelection
Goto Forum:
  


Current Time: Fri Oct 30 14:34:39 GMT 2020

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

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

Back to the top