(incubating) | The Free and Open Productivity Suite
Announcing Apache OpenOffice 3.4

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 Feather

Copyright & License | Privacy | Contact Us

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

Apache OpenOffice is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.