If you're using Tomcat, this can be done by editing the catalina.properties file (in the Tomcat conf folder) and appending the folder location (which will be something like /usr/local/OO2.3/program) to the common.loader variable. If they reside in a location other than their original one in the installation (which will be the case in Web applications), you must make sure that the location of the program folder is in the classpath. To make the code in Listing 1 work, the client JARs mentioned above need to be in the classpath. Object desktop = xServiceManager.createInstanceWithContext( XMultiComponentFactory xServiceManager = xContext.getServiceManager() Getting a Desktop object from UNO XComponentContext xContext = .() If is running on a local computer, things are much easier client libraries do most of the job, and they will even start for you, as shown in Listing 1. The .Desktop class, which is a part of UNO, represents this desktop thus, it is the root management point for all application frameworks. From the desktop, you can load viewable components, access frames and components, terminate the application, traverse the frame hierarchy, and dispatch command requests. The desktop is the root frame for this hierarchy. All application windows are organized in a hierarchy of frames that contain viewable components. With the client libraries in the classpath, it then takes the client side several lines of code to construct an access point to the running - an instance of the Java class .Desktop. can be started in server mode and prepared to accept network connections with the following command line: soffice -accept=socket,host=localhost,port=8100 urp You can find these JAR files in the directory where you installed. The libraries required for a client to access an server are: UNO libraries for both client and server modes are part of the standard distribution. You can connect to an server running either on a local or remote computer and use the UNO environment to work with documents. In this mode, listens to a network port for connections. Though it's usually thought of as a desktop application, can be also run in server mode. It is based on a component model called Universal Network Objects, or UNO, which allows components to communicate across the network oblivious to the platform they run on and the language they were written in.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |