RCP - jacob.dll

Hi!

I'm trying to make an eclipse rcp using the jacob.jar and jacob.dll.

When the application is distributed by webstart, the assembly jar installed on the client machine does include both jacob.jar and jacob.dll

How do I make a reference to the dll a) on my developer machine and b) how does the rcp-client reference it?

I have a directory structure in my project like this

src/*.java

libs/*.dll, *.jar

I have tried this:

System.setProperty("jacob.dll.path", "D:/1/libs/jacob.dll");

// this is working at my developer machine but not at the client - as the client doesn't have the D:\

or

System.setProperty("jacob.dll.path", "libs/jacob.dll");

//Result: java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: libs/jacob.dll - on my developermachine AND client

A solution that is working is to ensure that jacob.dll is in winxp/system32 - and I don't like this approach as I might have to "push" the jacob.dll to 400 clients before runnning the rcp-client.

Another solution that is working is to place the jacob.dll in a share all the clients has access to and do this:

System.setProperty("jacob.dll.path", "$share:/jacob/jacob.dll");

The goal is to be able to reference the jacob.dll without copying it to winxp/system32 or have a copy in a share somewhere at the network - but the jacob.dll must be a part of the rcp assembly jar which is installed on the client and the code working clientside must be able to reference the jacob.dll within this assembly jar.

Cheers

.

.

.

SOLVED

Solved it by reading::

http://eclipsezone.com/eclipse/forums/t66336.html

and editing my manifest-mf:

Bundle-NativeCode: libs/jacob.dll;processor="x86";osname="WindowsXP"

Message was edited by: self

elo_nitram

[1887 byte] By [elo_nitrama] at [2007-11-26 19:07:58]
# 1

DLL's should be supplied to a web start app. by

putting them in the root directory of an archive, and

adding the archive to the resources section of

the JNLP via a 'nativelib' element.

Once that is done, loading the library is as simple

as calling..

System.loadLibrary(java.lang.String)

.. where String is not 'jacob.dll', but simply

'jacob' (a linux based system would expect

a '.so' file there).

AndrewThompson64a at 2007-7-9 21:00:57 > top of Java-index,Desktop,Deploying...