T
Ten Blade
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).
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).