[Solved] Getting the selected JRE path from Open Office

Issues with installing under all Linux Distributions

[Solved] Getting the selected JRE path from Open Office

Postby rubal » Fri May 27, 2016 9:31 am

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
rubal
 
Posts: 22
Joined: Fri May 27, 2016 8:41 am

Re: Getting the selected JRE path from Open Office

Postby RoryOF » Fri May 27, 2016 10:13 am

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.6 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29478
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Getting the selected JRE path from Open Office

Postby rebecca223 » Fri May 27, 2016 12:11 pm

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
rebecca223
 
Posts: 1
Joined: Wed May 04, 2016 7:45 pm

Re: Getting the selected JRE path from Open Office

Postby Villeroy » Fri May 27, 2016 12:25 pm

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, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27112
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Getting the selected JRE path from Open Office

Postby RoryOF » Fri May 27, 2016 2:22 pm

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.6 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29478
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Getting the selected JRE path from Open Office

Postby rubal » Sat May 28, 2016 9:44 am

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

Postby rubal » Sat May 28, 2016 10:06 am

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

Postby rubal » Sat May 28, 2016 3:52 pm

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
rubal
 
Posts: 22
Joined: Fri May 27, 2016 8:41 am

Re: Getting the selected JRE path from Open Office

Postby RoryOF » Sat May 28, 2016 5:33 pm

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.6 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29478
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Getting the selected JRE path from Open Office

Postby rubal » Sat May 28, 2016 8:23 pm

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
rubal
 
Posts: 22
Joined: Fri May 27, 2016 8:41 am


Return to Linux

Who is online

Users browsing this forum: No registered users and 2 guests