- The Java Environment in Apache OpenOffice
- Apache OpenOffice
- OpenOffice.org 2.0
- Versions prior to OpenOffice.org 2.0
- Configuration
- Using the Java UNO runtime and API in your IDE
- Prepare the NetBeans IDE
- Prepare the Eclipse IDE
- Add the API Reference to your IDE
- Openoffice base no java
- Re: Base Not Finding Java Run Time Environment
- Re: Base Not Finding Java Run Time Environment
- Re: Base Not Finding Java Run Time Environment
- Re: Base Not Finding Java Run Time Environment
- Re: Base Not Finding Java Run Time Environment
- Re: Base Not Finding Java Run Time Environment
- Re: Base Not Finding Java Run Time Environment
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?.
Apache OpenOffice
Since the release of Apache OpenOffice 3.4.0 you can set the JRE from the menu Tools->Options : tree node OpenOffice->Java.
OpenOffice.org 2.0
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.
The java(.ini|rc) actually is an implementation detail. Unfortunately, it needs to be modified under some rare circumstances, for example for debugging purposes. You must not rely on the existence of the file nor should you make assumptions about its contents. |
In an office with a lower version than 2.0, the java(.ini|rc) is located in the \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:
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:
[Java] Home=file:///C:/Program%20Files/Java/j2re1.4.2 VMType=JRE Version=1.4.2 RuntimeLib=file:///C:/Program%20Files/Java/j2re1.4.2/bin/client/jvm.dll SystemClasspath=d:\645m15\program\classes\classes.jar;; . Java=1 JavaScript=1 Applets=1 MyAge=27
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 [Java] section:
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000
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:
Java Setting | Description |
---|---|
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. |
Configuration
Apache OpenOffice uses a Java Virtual Machine to instantiate components written in Java. From OpenOffice.org 2.x on, Java is found automatically during startup, or latest when Java functionality is required. If you prefer to preselect a JRE or JDK, or if no Java is found, you can configure Java using the Tools – Options dialog in Apache OpenOffice and select the section OpenOffice – Java section. In older versions of Apache OpenOffice you can also easily tell the office which JVM to use: launch the jvmsetup executable from the programs folder under the Apache OpenOffice, select an installed JRE or JDK and click OK. Close the Apache OpenOffice including the Quickstarter in the taskbar and restart Apache OpenOffice. Furthermore, open the Tools — Options dialog in Apache OpenOffice, select the section OpenOffice — Security and make sure that the Java enable option is checked.
Using the Java UNO runtime and API in your IDE
Next, the Apache OpenOffice API and Java UNO runtime class files must be made known to the Java IDE.
Prepare the NetBeans IDE
For NetBeans the necessary jar files are made available by simply installing the Apache OpenOffice API Plugin for NetBeans. After the configuration the plugin installs a new library in NetBeans that can be used in projects directly. The library will be automatically added to new projects created with the project wizards coming with the plugin. The following steps show how to install the plugin in NetBeans 5.5 or higher and how to create a new UNO client application project.
- Install and start NetBeans.
- From the Tools menu, select Update center. check mark at least the NetBeans Update Center and press Next. Under Features search for the entry OpenOffice.org API Plugin, select the entry, Add it, press Next, accept the license and follow the next steps to install it completely.
- A plugin specific configuration dialog comes up and required the input of a PATH to a valid office and office SDK installation . After completion of this dialog the plugin is installed and configured correctly.
- If you have a 64-bit machine, use Tools | Java Platforms to register your 32-bit JDK installation.
- From the File menu, select New Project. Select OpenOffice.org category and select the OpenOffice.org Client Application. Follow the next step and finish the project wizard.
- A new project with your specified name is created. The main function of a generated JAVA skeleton contains already the UNO bootstrap function that gives you access to an office context object as main entry point to get started with the Apache OpenOffice API. The context object is from a remote office instance that is connected over a named pipe connection and the default office is started automatically if no instance is running.
- If you have a 64-bit machine, right-click the project name in the project explorer on the left and choose Properties. Click the Libraries Category on the left and use the drop-down box on the right to choose your registered 32-bit Java Platform (JDK), then click the OK button.
- You can now edit, compile, and run your Apache OpenOffice project.
Prepare the Eclipse IDE
For Eclipse the necessary jar files may be made available by defining a User Library.
- Install and start Eclipse.
- From the Window menu, select Preferences. On the dialog window, select Java > Build Path > User Libraries. Press New to create a new User Library. The library’s name might be OpenOffice.org Libraries [SDK 3.0.1]. Press OK.
- Select the library and press Add JARs. On the JAR-Selection dialog you should add the necessary libraries. For a standard installation of Apache OpenOffice on unix, these are
- /opt/openoffice.org/ure/share/java/juh.jar
- /opt/openoffice.org/ure/share/java/jurt.jar
- /opt/openoffice.org/ure/share/java/ridl.jar
- /opt/openoffice.org/basis3.0/program/classes/unoil.jar
A standard installation of Apache OpenOffice on unix is rooted as /opt . For other installations the libraries should be found at corresponding locations.
Add the API Reference to your IDE
We recommend to add the API and the Java UNO reference to your Java IDE to get online help for the Apache OpenOffice API and the Java UNO runtime. The generated reference documentation provides Javadoc conform index files that can be integrated in most Java IDEs. In NetBeans the IDL reference is automatically integrated with the installation of the OpenOffice API Plugin.
Using the reference in NetBeans is quite simple, type an IDL type in the editor and press ALT + F1 . A further useful feature is the code completion feature that you get also automatically when you install the plugin.
Openoffice base no java
Post by rasputinxxxx » Wed Feb 08, 2023 1:59 am
I updated to the latest version of Java and subsequently Base does not find the Java Run time environment.
I followed the instructions and found the Java file but base says it can’t find Java in the file.
Last edited by MrProgrammer on Sat Feb 18, 2023 4:25 am, edited 1 time in total.
Reason: Tagged ✓ [Solved] — MrProgrammer, forum moderatorrobleyd Moderator Posts: 4763 Joined: Mon Aug 19, 2013 3:47 am Location: Murbko, Australia
Re: Base Not Finding Java Run Time Environment
Post by robleyd » Wed Feb 08, 2023 2:36 am
Did you make sure to get the 32 bit version of Java — needed by the Windows distribution of AOO which is 32 bit?
Cheers
David
OS — Slackware 15 64 bit
Apache OpenOffice 4.1.14
LibreOffice 7.5.4.2; SlackBuild for 7.5.4 by Eric HameleersZizi64 Volunteer Posts: 11125 Joined: Wed May 26, 2010 7:55 am Location: Budapest, Hungary
Re: Base Not Finding Java Run Time Environment
Post by Zizi64 » Wed Feb 08, 2023 7:41 am
Possible workarounds — if you have 32 bit Java now :
— try to install an older version of the Java. The AOO maybe is not compatible with the latest versions of the Java.
— change to the LibreOffice. It has more compatibility with the updated environment, and the LO has 64 bit version for Windows.Tibor Kovacs, Hungary; LO6.4.7-7.4.6 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.5.4 ; AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line — if your problem has been solved.UnklDonald418 Volunteer Posts: 1527 Joined: Wed Jun 24, 2015 12:56 am Location: Colorado, USA
Re: Base Not Finding Java Run Time Environment
Post by UnklDonald418 » Wed Feb 08, 2023 8:40 am
If your problem has been solved, please edit this topic’s initial post and add «[Solved]» to the beginning of the subject line
Apache OpenOffice 4.1.2 & LibreOffice 6.4.7.2 — Windows 10 ProfessionalZizi64 Volunteer Posts: 11125 Joined: Wed May 26, 2010 7:55 am Location: Budapest, Hungary
Re: Base Not Finding Java Run Time Environment
Post by Zizi64 » Wed Feb 08, 2023 10:48 am
My AOO 4.1.7 and the AOO4.1.1.3 portable versions can recognise the installed 32 bit Temurin Java 1.8.0_312 version.
Tibor Kovacs, Hungary; LO6.4.7-7.4.6 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.5.4 ; AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line — if your problem has been solved.Re: Base Not Finding Java Run Time Environment
Post by rasputinxxxx » Fri Feb 10, 2023 4:54 am
I checked for an older version on my wife’s pc and my lap top without any luck.
Java not installed on those two computers.
I google the internet for older vesions and found a site but ti said these have not been updated and are not recomended for installation because of security aspects.
I developed a work around and will be suing that for not.
I am keeping the data file in archives hoping that LibreOffice and / or LibreOffice will be updated to use the current JRE.
I have both Open office and LibreOffice.
Re: Base Not Finding Java Run Time Environment
Post by rasputinxxxx » Tue Feb 14, 2023 7:39 am
Any chance that the developers will update OpenOffice and / or LibreOffice so that they are compatible with the current version of Java?
Zizi64 Volunteer Posts: 11125 Joined: Wed May 26, 2010 7:55 am Location: Budapest, Hungary
Re: Base Not Finding Java Run Time Environment
Post by Zizi64 » Tue Feb 14, 2023 7:48 am
Any chance that the developers will update OpenOffice and / or LibreOffice so that they are compatible with the current version of Java?
OpenOffice — no hope.
LibreOffice — maybe.(The developers of the LibreOffice extremly decreased the Java dependency of the LO when the license of the Oracle Java has been changed. MOST of the functions works without Java. (And there are some older third party extensions written in Java. )
Tibor Kovacs, Hungary; LO6.4.7-7.4.6 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.5.4 ; AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line — if your problem has been solved.