Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #6198

Need help with Unsatisfied Link Error

From Ten Blade <ten.blade@tenblade.com>
Newsgroups comp.lang.java.programmer
Subject Need help with Unsatisfied Link Error
Date 2011-07-15 03:35 +0000
Organization Your Company
Message-ID <Xns9F22EFFCDEABCtenblade@46.4.102.18> (permalink)

Show all headers | View raw


I am trying to make a start with UNO, the Open Office Org technology for 
writing OOO documents via Java programs. Unfortunately, I'm having 
trouble with my very first program and not finding any help on the OOO 
forums.

Here's the stacktrace that I get when I try to run the program using the 
Ant script that they supply:

run:
     [java] Exception in thread "main" java.lang.UnsatisfiedLinkError: no 
unowinreg in java.library.path
     [java] 	at java.lang.ClassLoader.loadLibrary(Unknown Source)
     [java] 	at java.lang.Runtime.loadLibrary0(Unknown Source)
     [java] 	at java.lang.System.loadLibrary(Unknown Source)
     [java] 	at com.sun.star.lib.loader.WinRegKey.<clinit>
(WinRegKey.java:90)
     [java] 	at 
com.sun.star.lib.loader.InstallationFinder.getPathFromWindowsRegistry
(InstallationFinder.java:201)
     [java] 	at com.sun.star.lib.loader.InstallationFinder.getPath
(InstallationFinder.java:109)
     [java] 	at com.sun.star.lib.loader.Loader.getCustomLoader
(Loader.java:174)
     [java] 	at com.sun.star.lib.loader.Loader.main(Loader.java:134)

BUILD FAILED
C:\eclipse\workspace\FirstUnoContact\build.xml:62: Java returned: 1


I have no idea what unowinreg is or does but I did manage to find it - I 
think. There is a unowinreg.dll in a cab file called openofficeorg1.cab. 
That cab file is in the OOO 3.3 SDK. I'm guessing that that's what my 
program needs to find to run successfully. 

To start with, I don't know if a Java program can use a dll that is 
sitting in a cab file. I've never come across that situation before. Can 
anyone tell me if that is even theoretically possible? Perhaps there is 
another unowinreg somewhere else and this one is a red herring?

If it _is_ possible, can anyone tell me how to make that dll visible to 
my program at run time? I've tried adding the cab file to the Eclipse 
project in the Properties/Build Path/Libraries window but the 'run' step 
still fails on the same error. I've also tried adding -Djava.library.path 
VM argument to the Ant script that contained the 'run' target but that 
failed too. I got the exact same error in both situations. 

I'm running on Windows XP SP2 using Eclipse 3.7 (Indigo). 

-- 
Ten-Blade 

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar


Thread

Need help with Unsatisfied Link Error Ten Blade <ten.blade@tenblade.com> - 2011-07-15 03:35 +0000
  Re: Need help with Unsatisfied Link Error Roedy Green <see_website@mindprod.com.invalid> - 2011-07-15 05:27 -0700
    Re: Need help with Unsatisfied Link Error "Rhino" <no_offline_contact_please@example.com> - 2011-07-15 10:04 -0400
      Re: Need help with Unsatisfied Link Error RedGrittyBrick <RedGrittyBrick@spamweary.invalid> - 2011-07-15 15:25 +0100
        Re: Need help with Unsatisfied Link Error Ten Blade <ten.blade@tenblade.com> - 2011-07-15 20:01 +0000
      Re: Need help with Unsatisfied Link Error Roedy Green <see_website@mindprod.com.invalid> - 2011-07-16 00:45 -0700

csiph-web