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

current working directory wrong running jpackage app

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • internal
    • internal
    • tools

      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.

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

              Created:
              Updated:
              Resolved: