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

Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • None
    • tools

      A DESCRIPTION OF THE PROBLEM :
      The launcher exe currently allows for 3 hardcoded variables: $APPDIR, $BINDIR and $ROOTDIR:
      https://github.com/openjdk/jdk23u/blob/master/src/jdk.jpackage/share/native/applauncher/AppLauncher.cpp#L119-L121


      However, it is not currently possible to to refer to the %APPDATA% folder or $HOME folder via variables in *.cfg files. Desktop applications will typically store userdata to %APPDATA%/Product or $HOME/.product so being able to access these values in *.cfg files would be very useful.

      The exe launcher already reads these variables for other purposes but doesn't make the values available in *.cfg files:
      https://github.com/openjdk/jdk23u/blob/master/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp#L247-L248


      Primary Feature Request:
      * Make %APPDATA% and %LOCALAPPDATA% available in *.cfg files (for example via $APPDATA and $LOCALAPPDATA so that code that already exists can be reused)


      Extended Feature Request:
      * Extended the macro / replacement system to expand any environment variable, APPDATA, PATH, JAVA_OPTS, HOME, XDG_CONFIG_HOME, etc

            asemenyuk Alexey Semenyuk
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: