This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1460814 - /etc/.java/.systemPrefs directory missing
/etc/.java/.systemPrefs directory missing
Status: NEW
Product: Fedora
Classification: Fedora
Component: java-1.8.0-openjdk (Show other bugs)
25
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: jiri vanek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-12 16:39 EDT by Robert Marcano
Modified: 2017-06-13 13:03 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Robert Marcano 2017-06-12 16:39:05 EDT
Description of problem:

The default directory /etc/.java/.systemPrefs used for system preferences is missing. The RPM spec creates it (1) but it isn't found after installation, "rpm -ql" doesn't show it as part of any of the packages.

(1) https://src.fedoraproject.org/cgit/rpms/java-1.8.0-openjdk.git/tree/java-1.8.0-openjdk.spec?h=f25#n1763


Version-Release number of selected component (if applicable):

java-1.8.0-openjdk-1.8.0.131-1.b12.fc25.x86_64
java-1.8.0-openjdk-devel-1.8.0.131-1.b12.fc25.x86_64
java-1.8.0-openjdk-headless-1.8.0.131-1.b12.fc25.x86_64
java-1.8.0-openjdk-src-1.8.0.131-1.b12.fc25.x86_64


Additional info:

Fedora 24 package has the same problem. When this directory is not found, Java try ${java.home}/.systemPrefs and this break administrator defined system preferences when the package is updated.


Workaround:

Manually create the directory
Comment 1 jiri vanek 2017-06-13 11:53:37 EDT
so actually the only thing you need, is to make java rpms to own /etc/.java  oook?


As for additional info, when the directory do nto exists, then there is no admin setup, so java is doing right to use its own settings, or not?
Comment 2 Robert Marcano 2017-06-13 12:05:29 EDT
(In reply to jiri vanek from comment #1)
> so actually the only thing you need, is to make java rpms to own /etc/.java 
> oook?
> 

Yes, I think the default should be that. Administrators using applications that store system preferences using the Java API expect that when an update of the JVM is installed those preferences stay. Currently on a JVM update it doesn't find the preferences because they are on the old release ${java.home}/.systemPrefs.

> 
> As for additional info, when the directory do nto exists, then there is no
> admin setup, so java is doing right to use its own settings, or not?

IMHO The directory should exists by default so it doesn't store in ${java.home}. JVM updates on Fedora are not done on the same directory, every update create a new one like /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-1.b12.fc25.x86_64

I remember there where discussions about the hidden /etc/.java directory but I don't recall there was a decision to remove it. Maybe there was but I can't find references to it. Only other packages patched to not warn about it, like https://bugzilla.redhat.com/show_bug.cgi?id=770972
Comment 3 Robert Marcano 2017-06-13 13:03:18 EDT
Note: Java 8 checks for /etc/.java/.systemPrefs not only for /etc/.java

See http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/solaris/classes/java/util/prefs/FileSystemPreferences.java#l168

Note You need to log in before you can comment on or make changes to this bug.