Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

OpenOfficeJava Component Loader


Contents

Introduction
Example in OpenOffice Basic

Introduction

Before you can take advantage of your component written in the programming language Java you have to load the Java component. The process of the loading of the component is enabled by the Java Component Loader.

In the following one describes, how you can load a component written in Java. The example is based on the programming language OpenOffice Basic.

Example in OpenOffice Basic

If you want access the services implemented in a Java class file, you must create the UNO service "com.sun.star.loader.Java2" to get the Java loader.

createUnoService("com.sun.star.loader.Java2")

In order to register your component you should create the implementation registration and register the desired service.

regImpl = createUnoService("com.sun.star.registry.ImplementationRegistration")
regImpl.registerImplementation("com.sun.star.loader.Java2", "file:///E:/Trash/Inspector/InstanceInspector.jar", null)

After suitable preparation you can create your service:

objectInstanceInspector = createUnoService("com.sun.star.beans.InstanceInspector")

 


Author: Bertram Nolte (Mon 18 Jun 2001 14:44:43)
Copyright 2001 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA.



Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.