The Java Environment in Apache OpenOffice
When UNO components written in Java are to be used within the office suite, the office suite has to be configured to use the appropriate JRE. For information on the supported JREs see Documentation/FAQ/Installation/Which version of Java do I need?.
Since the release of Apache OpenOffice 3.4.0 you can set the JRE from the menu Tools->Options : tree node OpenOffice->Java.
In OpenOffice.org 2.0 there is no java(.ini|rc) anymore. All basic Java settings are set in the options dialog: tree node OpenOffice.org->Java. The Parameters dialog can be used to specify the debug options and other arguments.
For applets there are still a few settings on the security panel (tree node OpenOffice.org->Security).
Versions prior to OpenOffice.org 2.0
Prior to OpenOffice.org 2.0, this configuration happened during the installation, when the Java setup was performed. Then, a user could choose a Java Runtime Environment or choose to install a JRE. After installing the office, the selected JRE could still be changed with the jvmsetup program, which was located in the program folder. The data for running the Java Virtual Machine was stored in the java(.ini|rc) file and other configuration files.
In an office with a lower version than 2.0, the java(.ini|rc) is located in the <officepath>\user\config directory. A client can use that file to pass additional properties to the Java Virtual Machine, which are then available as system properties. For example, to pass the property
MyAge, invoke Java like this:
java -DMyAge=30 RunClass
If you want to have that system property accessible by your Java component you can put that property into java(ini|rc) within the
[Java] section. For example:
To debug a Java component, it is necessary to start the JVM with additional parameters. The parameters can be put in the java.ini the same way as they would appear on the command-line. For example, add those lines to the
More about debugging can be found in the JDK documentation and in the Apache OpenOffice Software Development Kit.
Java components are also affected by the following configuration settings. They can be changed in the Tools - Options dialog. In the dialog, expand the OpenOffice node on the left-hand side and choose Security. This brings up a new pane on the right-hand side that allows Java specific settings:
|Enable||If checked, Java is used with the office. This affects Java components, as well as applets.|
|Security checks||If checked, the security manager restricts resource access of applets.|
|Net access||Determines where an applet can connect.|
|ClassPath||Additional jar files and directories where the JVM should search for classes. Also known as user classpath.|
|Applets||If checked, applets are executed.|
|Content on this page is licensed under the Public Documentation License (PDL).|