Hello,

I was doing some experiments with the OOoBean with Sun JDK 1.5 and found the following:

officebean.jar (shipped with OOo 2.0.4 on Debian Etch AMD64) contains classes for the package com.sun.star.comp.beans.

I'm trying to use this package from my program (after setting the classpath on the command line).

When I'm running the generated .class file directly, everything works fine. But when I package my App in a jar archive, I get NoClassDefFoundError for the class com.sun.star.comp.beans.NoConnectionException.

Below is a short, demonstrative example (the same holds with OOo 2.1 on WinXP, java version 1.5.0_06, 32bit). Exactly the same holds using the com.sun.star.lib.loader.Loader classloader.

Thank you for any suggestions:
Jozsef

$ java -version
java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_10-b03, mixed mode)


[EMAIL PROTECTED]:$ cat OOoBeanTest.java
import com.sun.star.comp.beans.*;

public class OOoBeanTest {
        public static void main(java.lang.String[] args) {
                try {
throw new com.sun.star.comp.beans.NoConnectionException();
                } catch (java.lang.Exception e) {
                };
        }
}


[EMAIL PROTECTED]:$ javac -cp /usr/lib/openoffice/program/classes/officebean.jar ./OOoBeanTest.java


[EMAIL PROTECTED]:$ java -cp /usr/lib/openoffice/program/classes/officebean.jar:. OOoBeanTest


[EMAIL PROTECTED]:$ cat Manifest.txt
Main-Class: OOoBeanTest


[EMAIL PROTECTED]:$ jar cfm test1.jar Manifest.txt OOoBeanTest.class


[EMAIL PROTECTED]:$ java -cp /usr/lib/openoffice/program/classes/officebean.jar:. -jar test1.jar Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/star/comp/beans/NoConnectionException



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to