To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=52761





------- Additional comments from [EMAIL PROTECTED] Tue Aug 16 13:10:37 -0700 
2005 -------
Hi there,

the following Java program "RgfUnoAnalyzeTest4.java" may be a little bit more
helpful, in that it lists the available services by name. If you uncomment the
bootstrapping line (and comment the existing one), you will get that dreadful
runtime error that Java cannot find "juh"[.dll] in the Java environment:

---------------------- cut here --------------------
import com.sun.star.comp.helper.Bootstrap;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;

public final class RgfUnoAnalyzeTest4 {

    static String key [] = 
{"/singletons/com.sun.star.reflection.theCoreReflection",
                           
"/singletons/com.sun.star.reflection.theTypeDescriptionManager",
                            "/singletons/com.sun.star.lang.theServiceManager"
                           };
    static XComponentContext ctxt0=null;

    /** Static block to initialize static fields. */
    static {
        try
        {
                // the following does not work
            // ctxt0=Bootstrap.defaultBootstrap_InitialComponentContext(); // as
of issue-resolver

                // the following works, but has not the reflection singletons in
the context!
            ctxt0=Bootstrap.createInitialComponentContext(null) ;   // creates a
minimal UNO environment

            System.err.println("ctxt0="+pp(ctxt0)+"\n---");

                // get the service manager from the context
            String [] sNames=((com.sun.star.lang.XMultiComponentFactory)
ctxt0.getServiceManager()).getAvailableServiceNames();
           
System.err.println("getServiceManager()="+pp(ctxt0.getServiceManager())+"\n---");

            for (int i=0; i<sNames.length; i++)
            {
                System.err.println("Service # "+pp(""+i)+": "+pp(sNames[i]));
            }
            System.err.println("---");


            for (int i=0; i<key.length; i++)
            {
                System.err.print(key[i]+"=");
                Object tcr2=ctxt0.getValueByName(key[i]);
                System.err.println(pp(tcr2));
            }
        }
        catch (Exception e)
        {
            System.err.println("Exception:" + pp(e) + "has occurred!");
        }
    }


    public static void main(String[] arguments) throws Exception {

        System.exit(0);
    }

    private RgfUnoAnalyzeTest4 () {}

    public static String pp(Object o)
    {
        if (o==null) return "<null>  <=== <=== <===";
        return "<"+o.toString()+">";
    }
}
---------------------- cut here --------------------


HTH,

---rony



---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

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


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

Reply via email to