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

It is no longer possible to change "user.dir" in the JDK8

    XMLWordPrintable

Details

    • b01
    • generic
    • generic

    Backports

      Description

        The last release of jdk8u includes the fix for JDK-8194154 which disabled the possibility to change the "user.dir" property.

        Changing the "user.dir" was not recommended from the beginning but it was not forbidden, so there are some old applications that rely on the old behavior. One of the app which sets the "user.dir" is Gradle. The Gradle has a notice in the documentation for the user:
        "Never use new File(relative path) because this creates a path relative to the current working directory (CWD). Gradle can make no guarantees about the location of the CWD, which means builds that rely on it may break at any time".

        But for compatibility reasons they still set the "user.dir" property, so the old plugins will work.
        Now that compatibility is broken due to the fix I mention. We found such apps immediately after the release.

        I think we should roll it back as soon as possible. Here we can discuss it further.

        See some discussion here:
        https://mail.openjdk.org/pipermail/jdk8u-dev/2022-July/015249.html

        Attachments

          Issue Links

            Activity

              People

                serb Sergey Bylokhov
                serb Sergey Bylokhov
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: