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

Jvm Arguments and Jvm Properties are missing in executable output when bundled through ANT

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2
    • 9
    • 9
    • deploy
    • None
    • java version "9-ea"
      Java(TM) SE Runtime Environment (build 9-ea+145)
      Java HotSpot(TM) 64-Bit Server VM (build 9-ea+145, mixed mode)

    • 9
    • windows

    Description

      Resources:
      1. download the attachments for both JDK8 and JK9 ant xml files, JDK8 simple normal jars, JDK9 simple normal jars and JDK9 modular jars to your local system.
      2. Download latest 8u122 build from repository.
      3. Download JDK9 145 build from repository.

      ===================================================================
      STEPS TO REPRODUCE.
      ===================================================================

      I am comparing both JDK8 and JDK9 executions.

      ===================================================================
      JDK8 EXECUTION:
      ===================================================================

      1. In ant xml file "jvmoptionsantJDK8_normal_jars.xml" modify following attributes according to your system.
       a. <taskdef classpath=""> =======> points to "$JAVA_HOME\jdk1.8.0_122\lib\ant-javafx.jar"
       b. <fx:resources> <fx:fileset dir=""> ===> points to downloaded JDK8 normal jar location.
       c. <fx:deploy outdir=""> ===> points to output directory.

      2. try to execute following command at command line.

      ant -f jvmoptionsantJDK8_normal_jars.xml -verbose

      3. you can find the bundle in output directory mentioned in step 1 c.
      4. double click on bundle and proceed for installation.
      5. set environmental variable through command "set _JAVA_LAUNCHER_DEBUG=true"
      6. Navigate to installed folder C:\Users\<UserName>\AppData\Local\App1 and execute the following commands
       a. App1.exe 1> stdout.log
       b. App1.exe 2> stderr.log

      7. check whether stdout.log and stderr.log contains following text
       -Dsqe.foo.bar=baz
       -Dsqe.qux.corge=grault
       -Dsqe.aba.caba=dabacaba
       
      ===============================================================================
      JDK9 EXECUTION:
      ===============================================================================

      1. In ant xml file "jvmoptionsantJDK9_normal_jars.xml" modify following attributes according to your system.
       a. <taskdef classpath=""> =======> points to "$JAVA_HOME\lib\ant-javafx.jar"
       b. <fx:resources> <fx:fileset dir=""> ===> points to downloaded JDK9 normal jar location.
       c. <fx:deploy outdir=""> ===> points to output directory.

      2. try to execute following command at command line.

      ant -f jvmoptionsantJDK9_normal_jars.xml -verbose

      3. you can find the bundle in output directory mentioned in step 1 c.
      4. double click on bundle and proceed for installation.
      5. set environmental variable through command "set _JAVA_LAUNCHER_DEBUG=true" at command line
      6. Navigate to installed folder C:\Users\<UserName>\AppData\Local\JvmOptionsTest_ANT_NormalJar_exe and execute the following commands
       a. JvmOptionsTest_ANT_NormalJar_exe.exe 1> stdout.log
       b. JvmOptionsTest_ANT_NormalJar_exe.exe 2> stderr.log

      7. check whether stdout.log and stderr.log contains following text
       -Dsqe.foo.bar=baz
       -Dsqe.qux.corge=grault
       -Dsqe.aba.caba=dabacaba

      8. I don't results of step 7 in stdout.log and stderr.log

      Repeat steps 1 to 8 for Modular Jars too, step 7 results are missing too in modular jars.

      EXPECTED OUTPUT:
      jvmoptions and jvmproperties should be present in stdout.log and stderr.log
      -Dsqe.foo.bar=baz
      -Dsqe.qux.corge=grault
      -Dsqe.aba.caba=dabacaba

      Attachments

        Issue Links

          Activity

            People

              cbensen Chris Bensen (Inactive)
              rgangadhar Ramesh Gangadhar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: