Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Ten Blade Newsgroups: comp.lang.java.programmer Subject: Need help with Unsatisfied Link Error Date: Fri, 15 Jul 2011 03:35:32 +0000 (UTC) Organization: Your Company Lines: 52 Message-ID: Injection-Date: Fri, 15 Jul 2011 03:35:32 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="LddhMBUES4ZvZtYq4Cr0sg"; logging-data="25464"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/z1t3Qqf0BN4HubSCbAEZffFt1rIhtX84=" User-Agent: Xnews/5.04.25 X-Antivirus-Status: Clean X-Antivirus: avast! (VPS 110714-1, 2011-07-14), Outbound message Cancel-Lock: sha1:VAUg9fmfoOk9uBssP84hKAvYpcQ= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6198 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. (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