Accessing Packages from LiveConnect

Brett Zamir <[email protected]> Mon, 09 Jul 2007 15:36:38 +0800
Newsgroups gmane.comp.mozilla.devel.java
Message-ID <4691E586.1010702__26776.9793434583$1183966635$gmane$org@yahoo.com>
Hello,

I am trying to get access to Berkeley DB XML's Java classes from within 
XUL and it doesn't seem to work for me.

Whereas I can get the built-in Java packages from XUL with no problem:

    var abc = java.lang.System.out.println("aaaa");  // Writes 
sucessfully to the Java Console that I have set to open

I have no luck with BDBXML from XUL, even though it is in my CLASSPATH 
(if that's where it's supposed to be for it to be available):

    var xmlman = new Packages.com.sleepycat.dbxml.XmlManager();

    gives:

    TypeError: Packages.com.sleepycat.dmxml.XmlManager is not a constructor

I've also successfully been able to test what should I believe be the 
equivalent file in Java (using NetBeans) and there is no problem.

import com.sleepycat.dbxml.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws Throwable {
        try {
            XmlManager myManager = new XmlManager();
        }
        catch (XmlException e) {
            System.out.println("XMLexception" + e);
        }
        catch (Exception e) {
            System.out.println("Exception1" + e);
        }
    }
}

thx in advance,
Brett