Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-6622433

-vmoption(s) values should not be passed to javac

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • jtreg4.0
    • jtreg3.2.2_02
    • tools
    • None
    • team
    • generic
    • generic

      A conversation with Jonathan Gibbons concluded:
      - explicit VM options on the command line get passed to both
        the java VM and the javac VM

      - options specified in -vmoption(s) get passed to the java VM
        but not to the javac VM

      - options specified in -javacoption(s) get passed to the javac VM
        but not to the java VM

      So the bug is that currently, an option specified in -vmoption(s) incorrectly gets passed to javac

      The following script demonstrates this. It passes -Xcomp and -showversion in -vmoptions and then shows that the compile is done in 'compiled mode':

      #!/bin/sh

      JAVA_HOME=/java/re/jdk/1.7.0/latest/binaries/solaris-sparc
      export JAVA_HOME
      rm -rf /tmp/BB

       ksh /java/re/jct-tools/3.2.2_02/nightly/binaries/latest/solaris/bin/jtreg \
         -a \
         -vmoption:-showversion \
         -vmoption:-Xcomp \
         -othervm -testjdk:$JAVA_HOME \
         -v \
         -w:/tmp/BB \
         -r:/tmp/BB \
         /java/svc/ws/j2se/service_sdk_baseline/test/com/sun/jdi/DeleteAllBkptsTest.java

      echo
      echo "========================================================"
      echo "Note that the compile is done with -Xcomp"
      echo "========================================================"

      tail -47 /tmp/BB/com/sun/jdi/DeleteAllBkptsTest.jtr | head -14

            jjg Jonathan Gibbons
            jjh James Holmlund (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: