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

Application started using javaws now starts in {java.home} rather than current directory

XMLWordPrintable

    • b124
    • x86_64
    • windows_7

        FULL PRODUCT VERSION :
        java version "1.8.0_91"
        Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
        Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)


        ADDITIONAL OS VERSION INFORMATION :
        Windows 7 Pro, 64 bit

        A DESCRIPTION OF THE PROBLEM :
        When using javaws update 91, the application working directory is now an equivalent of {java.home}, rather than the current (command invocation) directory.

        As a result, an application invoked as:
        $ cd C:\Users\mbrunecky
        $ javaws -open Foo.properties <jnlp_url>

        trying to open "Foo.properties" attempts to open {java.home}/Foo.properties
        instead of "C:\Users\mbrunecky\Foo.properties".
        (and obviously fails).
        In addition, any files created by such application are created in {java.home}
        rather than the current working directory (unless file specification includes an explicit path).

        This is another, but more serious consequence than the (related) bug JDK-8154899 (fixed?). The problem is not only an incorrect reporting of the system property "user.home", the problem is that application invocation working directory is WRONG!
        (I want to make sure bug 8154899 is 'fixed RIGHT")





        REGRESSION. Last worked in version 8u77

        ADDITIONAL REGRESSION INFORMATION:
        java version "1.8.0_91"
        Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
        Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Within JNLP application, assuming arguments -open Foo.properties, add line

        System.err.println("Arg " + args[0] " + new File(args[1]).getAbsolutePath());

        Once invoked using:
        javaws -open Foo.properties <jnlp_url>

        you will see that instead of resolving Foo.properties to the current working directory, the "Foo.properties" will resolve to {java.home}/Foo.properties


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        javaws -open Foo.properties <jnlp_url>
        resolving to
        {command working directory}/Foo.properties
        ACTUAL -
        javaws -open Foo.properties <jnlp_url>
        {java.home}/Foo.properties
        (file not found)

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        None, -open option has become useless

        REPRODUCIBILITY :
        This bug can be reproduced always.

        CUSTOMER SUBMITTED WORKAROUND :
        Revert to java 1.8.0_77

              almatvee Alexander Matveev
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: