Hi,

I try to compile a java program (initial author Andre Schnabel), which exports 
documents (with OOo) to PDF. This program was created, while OOo 2.3 was the 
current version, and it worked. Now I try to make this program available for 
OOo 3, but the java program is not able to get a running office.
Here are the part of the code, that tries to launch OOo:

 static XComponentLoader getCompLoader () {
        XComponentLoader xCompLoader=null;
            
        if (myArgs.verbose)
            System.out.println( "->getCompLoader");

        try {
            // get the remote office component context
            xContext = Bootstrap.bootstrap ();
            
            // get ServiceManager
            xMCF =    xContext.getServiceManager();
            //get Desktop
            oDesktop = 
xMCF.createInstanceWithContext( "com.sun.star.frame.Desktop", xContext);

            //and Component loader
            xCompLoader = (com.sun.star.frame.XComponentLoader) 
                
UnoRuntime.queryInterface(com.sun.star.frame.XComponentLoader.class, 
oDesktop);

        } catch (java.lang.Exception e) {
            System.err.println("Failed to get a running Office");
        }
        return xCompLoader;
    }

Thanks for any hints.

Regards,
Andreas
-- 
## Content Developer OpenOffice.org: lang/DE
## Freie Office-Suite für Linux, Mac, Windows, Solaris
## http://de.openoffice.org
## OpenOffice.org Portable: http://oooportable.org
## Meine Seite: http://www.amantke.de 

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

Reply via email to