Hi,
On running the below code (given in the "First Steps" section of the
developer guide wiki), I'm getting java.lang.UnsatisfiedLinkError:
unowinreg (Not found in java.library.path)
package de.ooo.devguide.example1;
public class FirstUnoContact {
public static void main(String[] args) {
try {
// get the remote office component context
com.sun.star.uno.XComponentContext xContext =
com.sun.star.comp.helper.Bootstrap.bootstrap();
System.out.println("Connected to a running office ..."
);
com.sun.star.lang.XMultiComponentFactory xMCF =
xContext.getServiceManager();
String available = (xMCF != null ? "available" : "not
available");
System.out.println("remote ServiceManager is " +
available);
} catch (java.lang.Exception e) {
e.printStackTrace();
} finally {
System.exit(0);
}
}
}
Exception trace is given below:
Exception in thread "main" java.lang.UnsatisfiedLinkError: unowinreg (Not
found in java.library.path)
[java] at java.lang.ClassLoader.loadLibraryWithPath(
ClassLoader.java:986)
[java] at java.lang.ClassLoader.loadLibraryWithClassLoader(
ClassLoader.java:950)
[java] at java.lang.System.loadLibrary(System.java:453)
[java] at com.sun.star.lib.loader.WinRegKey.<clinit>(
WinRegKey.java:93)
[java] at java.lang.J9VMInternals.initializeImpl(Native Method)
[java] at java.lang.J9VMInternals.initialize(
J9VMInternals.java:194)
[java] at
com.sun.star.lib.loader.InstallationFinder.getPathFromWindowsRegistry(
InstallationFinder.java:207)
[java] at com.sun.star.lib.loader.InstallationFinder.getPath(
InstallationFinder.java:115)
[java] at com.sun.star.lib.loader.Loader.getCustomLoader(
Loader.java:176)
[java] at com.sun.star.lib.loader.Loader.main(Loader.java:137)
Any idea on how to resolve this issue?
Is this any path/classpath related issue?
Thanks,
Sagar.
IBM India Pvt. Ltd .
Fortius Block,FB-2F-B156,First Technology Place,
EPIP White Field,Bangalore-560066.
Off: +91-80 226-70476
Mob: +91-97399-82566
Fax: +91-80 226-70266
Email: [email protected]
PTC Home Page: ptc.hursley.ibm.com