Config JRE for openoffice3.0
If you use OpenOffice to parse Word files, you know that JRE needs to be configured. The general practice is as follows:
- Start OpenOffice
- Select Tools --> options
- Select the Java option under OpenOffice.org
- Select the appropriate JRE, click OK, and restart OpenOffice, for example:
Problem:
OpenOffice's default JRE comes with the system. We can use the JDK version we commonly use in the above method. However, if the server is in batch production, isn't the above manual settings too cumbersome? How can I change it through commands or scripts?
You can refer to the OpenOffice official documentation as follows:
The configuration is stored in
< staroffice-config > /user/config/javasettings_ < platform > .xml
Just delete this file if you want StarOffice to detect again. the Java configuration file cannot be modified manually. the data format is not specified and may change anytime without further notice. don't try to modify that file to change the Java version. the <location> and <version> entries are only for 'documentation', the Java version is accessed via the <vendordata>, Which is binary.
Solution:
Use the locate command to find the deleettings configuration file, and find it in the following directory:
/Root/. ooo3/user/config/javasettings_linux_x86.xml
Copy the OpenOffice configuration file (javasettings_linux_x86.xml) on the JRE server to an unconfigured machine and start OpenOffice.
Appendix:
The content of the javasettings_linux_x86.xml file is as follows:
<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <! -- This is a generated file. do not alter this file! --> <Br/> <Java xmlns = "http://openoffice.org/2004/java/framework/1.0" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"> <br/> <enabled xsi: nil = "true"/> <br/> <userclasspath xsi: Nil = "true"/> <br/> <vmparameters xsi: nil = "true"/> <br/> <jrelocations xsi: Nil = "true"/> <br/> <javainfo xsi: nil = "false" vendorupdate = "2004-01-30" Autoselect = "true"> <br/> <vendor> Sun Microsystems Inc. </vendor> <br/> <location> file: /// usr/lib/JVM/java-1.6.0-openjdk-1.2_b11/JRE </location> <br/> <version> 1.6.0 _ 0 </version> <br/> <features> 1 </ features> <br/> <requirements> 1 </requirements> <br/> <vendordata> events </vendordata> <br/> </javainfo> <br/> </ java> <br/>
Note: This file can only be replaced and cannot be modified. The content in <vendordata> is the true version number description.