Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8290140

Follow the XDG Base Directory Specification on Linux systems | OpenJDK

XMLWordPrintable

    • 2d
    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      Java info:
      openjdk 18.0.1.1 2022-04-22
      OpenJDK Runtime Environment (build 18.0.1.1+2)
      OpenJDK 64-Bit Server VM (build 18.0.1.1+2, mixed mode

      OS: Arch Linux

      A DESCRIPTION OF THE PROBLEM :
      Currently Java (OpenJDK) put its configuration and other data files inside `$HOME/.java`.

      Please follow XDG XDG Base Directory Specification on Linux systems.

      Specification: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

      I'm aware of the several environment variables to configure Java like `JAVA_TOOL_OPTIONS`, `JDK_JAVA_OPTIONS`, `_JAVA_OPTIONS`.

      I'm also aware of the flag `-Djava.util.prefs.userRoot` which seems to work but only partially: for example, the directory `$HOME/.java/fonts/` is still created even after changing the value of the mentioned flag.

      Here's a related bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1154277

      Thanks.


            prr Philip Race
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: