Bug 107686 - add a registry value to configure Java feature
Summary: add a registry value to configure Java feature
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha1+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: Java-Runtime-JRE UI-Lockdown
  Show dependency treegraph
 
Reported: 2017-05-07 15:39 UTC by Oliver Brinzing
Modified: 2023-10-11 10:40 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
java registry settings (73.97 KB, image/jpeg)
2017-05-07 15:39 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Brinzing 2017-05-07 15:39:08 UTC
Created attachment 133134 [details]
java registry settings

Menu Tools/Options.../LibreOffice/Advanced/Java Options
"[X] Use a Java runtime environment" allows to enable/disable Java.

Java settings can be preconfigured using a"javasettings_Windows_x86.xml"
in \share\config, for example:

<?xml version="1.0" encoding="UTF-8"?>
<java xmlns="http://openoffice.org/2004/java/framework/1.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<enabled xsi:nil="true"/>
	<userClassPath xsi:nil="true"/>
	<vmParameters xsi:nil="false">
		<param>-Xms64M</param>
		<param>-Xmx512M</param>
	</vmParameters>
	<jreLocations xsi:nil="true"/>
	<javaInfo xsi:nil="false" vendorUpdate="2013-05-02" autoSelect="false">
         [...]
	</javaInfo>
</java>

if a shared java setting is present, LO will write a dummy (?) "javasettings_Windows_x86.xml" to \user\config:

<?xml version="1.0" encoding="UTF-8"?>
<!--This is a generated file. Do not alter this file!-->
<java xmlns="http://openoffice.org/2004/java/framework/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<enabled xsi:nil="true"></enabled>
<userClassPath xsi:nil="true"></userClassPath>
<vmParameters xsi:nil="true"></vmParameters>
<jreLocations xsi:nil="true"></jreLocations>
<javaInfo xsi:nil="true"></javaInfo>
</java>

in an enterprise environment users maybe should not be able to change 
preconfigured java settings. but at the moment a user can change it.
the changed "javasettings_Windows_x86.xml" is written to \user\config
and replaces the shared java settings.

checkbox "[X] Use a Java runtime environment" sets
<enabled xsi:nil="false">true</enabled> or
<enabled xsi:nil="false">false</enabled>
inside "javasettings_Windows_x86.xml".

there is also a registry entry "org.openoffice.Office.Java/VirtualMachine/Enable" but changing it's value seems to have no effect.