[Solved] Getting the selected JRE path from Open Office

Issues with installing under all GNU/Linux Distributions
Post Reply
rubal
Posts: 22
Joined: Fri May 27, 2016 8:41 am

[Solved] Getting the selected JRE path from Open Office

Post by rubal »

I do not want to install Java or JRE in the project that creates my open office calc project heavy to execute and is difficult to run on any OS with jars attached. Hence, I want to know the way to extract the path of jre selected in Open Office(Tools>Options>OpenOffice>Java) in any OS where my OXT file is installed via java. I am using UNO package for it.
Last edited by RoryOF on Sat May 28, 2016 9:01 pm, edited 2 times in total.
Reason: Added [Solved]. [RoryOF, Moderator]
open office 4.1.2
Ubuntu
User avatar
RoryOF
Moderator
Posts: 34610
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Getting the selected JRE path from Open Office

Post by RoryOF »

This is not an immediate answer, but it may help you. On a linux machine the Java path is stored in
/home/<UserName>/.openoffice/4/user/config/javasettings_Linux_X86_64.xml

As this is a plain text file extraction of the path should be simple. I have not found (not exhaustive search) an API routine to return the Java path, but there may be one.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
rebecca223
Posts: 1
Joined: Wed May 04, 2016 7:45 pm

Re: Getting the selected JRE path from Open Office

Post by rebecca223 »

Can't find an API routine as well....Any help?
OpenOffice Windows Vista neooffice 2.2.3 ?? MacOS 10.4 / OpenOffice 2.4 ???? Ubuntu 9.04
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Getting the selected JRE path from Open Office

Post by Villeroy »

As long as you don't use add-in functions written in Java, the spreadsheet functionality does not depend on any Java code. Apart from one or two seconds on first start, disabling Java won't yield any gains in performance. However, you may be able to get massive performance improvements by using a Java database to store data and dump selected records into your spreadsheet application.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
RoryOF
Moderator
Posts: 34610
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Getting the selected JRE path from Open Office

Post by RoryOF »

The solution will probably be to access the file I named (or its local equivalent if a different operating system) and extract the information. This should be a simple task in any language.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
rubal
Posts: 22
Joined: Fri May 27, 2016 8:41 am

Re: Getting the selected JRE path from Open Office

Post by rubal »

RoryOF wrote:This is not an immediate answer, but it may help you. On a linux machine the Java path is stored in
/home/<UserName>/.openoffice/4/user/config/javasettings_Linux_X86_64.xml

As this is a plain text file extraction of the path should be simple. I have not found (not exhaustive search) an API routine to return the Java path, but there may be one.
Hey, I think this suits my needs, I can use this file to get the JRE path in Linux. I need to check for different OS that works in similar condition. Thanks to you "RoryOF". :D
open office 4.1.2
Ubuntu
rubal
Posts: 22
Joined: Fri May 27, 2016 8:41 am

Re: Getting the selected JRE path from Open Office

Post by rubal »

Villeroy wrote:As long as you don't use add-in functions written in Java, the spreadsheet functionality does not depend on any Java code. Apart from one or two seconds on first start, disabling Java won't yield any gains in performance. However, you may be able to get massive performance improvements by using a Java database to store data and dump selected records into your spreadsheet application.
I am using Java as development language and working on Apache Open Office project( OXT is being used in Open Office), hence Java is required.
open office 4.1.2
Ubuntu
rubal
Posts: 22
Joined: Fri May 27, 2016 8:41 am

Re: Getting the selected JRE path from Open Office

Post by rubal »

I need to know the similar way path to file quoted by "RoryOF" for Windows, I am not able to find that directory that might be containing the JRE path selected in Open Office (Tools>Options>OpenOffice>Java).
open office 4.1.2
Ubuntu
User avatar
RoryOF
Moderator
Posts: 34610
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Getting the selected JRE path from Open Office

Post by RoryOF »

Outside of OpenOffice bore down through your OpenOffice User Profile until you start to match the path I quoted, probably at the user folder.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
rubal
Posts: 22
Joined: Fri May 27, 2016 8:41 am

Re: Getting the selected JRE path from Open Office

Post by rubal »

RoryOF wrote:Outside of OpenOffice bore down through your OpenOffice User Profile until you start to match the path I quoted, probably at the user folder.
Thank you, I found it.
open office 4.1.2
Ubuntu
Post Reply