Default Configuration

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 17:31, 21 December 2020 by DiGro (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Office Bean uses default values for all the configuration settings, if none are provided:

  • Since 1.1.0 the officebean.jar is located in the <OfficePath>/program/classes directory.
  • It looks for the local library (Windows: officebean.dll, Unix: relative to the officebean.jar in the <OfficePath>/program directory. The local library depends on the following shared libraries:
    1. The library sal3 (Windows: sal3.dll, Unix: is located in the <OfficePath>/program folder. It maybe necessary to add the <OfficePath>/program folder to the PATH environment variable if the bean cannot find sal3.
    2. The library jawt.dll is needed in Windows. If the bean cannot find it, check the Java Runtime Environment binaries (<JRE>/bin) in your PATH environment variable.
  • It expects the Apache OpenOffice installation in the default install location for the current platform. The soffice executable is in the program folder of a standard installation.
  • The pipe name is created using the value of the Java property. The name of the pipe is created by appending "_office" to the name of the currently logged on user, for example, if the is "JohnDoe", the name of the pipe is "JohnDoe_office".

Based on these default values, the Office Bean tries to connect to an office. The office must run in listening mode. That is, it must have been started with the -accept command line option. If there is no running office, then it attempts to start one. The exact parameters used by the bean are:

 soffice.exe -bean -accept=pipe,name=<>_Office;urp;StarOffice.NamingService
 soffice -bean "-accept=pipe,name=<>_Office;urp;StarOffice.NamingService"
Documentation caution.png There is a limitation in the communication process with the Office Bean and older versions of Apache OpenOffice. If a Apache OpenOffice process is already running that was not started with the proper -accept=pipe option, the Office Bean does not connect to it. Since 1.1.0 this limitation is obsolete.

In case an office document is displayed outside of the Java frame, then the office has probably been started with wrong or no arguments. Providing the proper command-line arguments is necessary, so that the Apache OpenOffice process can open a correctly named pipe, through which it communicates with the Java application. Only if this pipe can be established, the office will display the document in the Java window.

You can avoid providing the command-line options by editing the file <OfficePath>\user\config\registry\instance\org\openoffice\Setup.xml. Within the <Office/> element, the developer adds an <ooSetupConnectionURL/> element with settings for a named pipe. The following example shows a user-specific Setup.xml that configures a named pipe for a user named JohnDoe:

  <?xml version="1.0" encoding="UTF-8"?>
  <Setup state="modified" cfg:package="org.openoffice" 
    <ooSetupConnectionURL cfg:type="string">
      <Factories cfg:element-type="Factory">
        <Factory cfg:name="">
          <ooSetupFactoryWindowAttributes cfg:type="string">

With this user-specific Setup.xml file, the office opens a named pipe JohnDoe_Office whenever it starts up. It does not matter if the user double clicks a document, runs the Quickstarter, or starts a new, empty document from a Apache OpenOffice template.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages