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

current working directory wrong running jpackage app

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: internal
    • Fix Version/s: internal
    • Component/s: tools
    • Labels:

      Description

      When running an app created by jpackage, the current working directory is set to the "app" directory.

      confirmed building simple app-image from app with the following source:
      import java.io.*;


      public class pwd {
          public static void main (String[] args) {
              try {
                  String current = new java.io.File( "." ).getCanonicalPath();
                  System.out.println("Current dir:"+current);
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
      }

      It would be expected that an app run from a command line should have the current working directory of the shell that invoked it.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              herrick Andy Herrick (Inactive)
              Reporter:
              herrick Andy Herrick (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: