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

Jigsaw logs are not shown in console

    Details

    • Subcomponent:
    • Resolved In Build:
      b23
    • CPU:
      x86
    • OS:
      windows_7

      Description

      FULL PRODUCT VERSION :
      java version "9-ea"
      Java(TM) SE Runtime Environment (build 9-ea+174)
      Java HotSpot(TM) Server VM (build 9-ea+174, mixed mode, emulated-client)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      Latest EA versions of JDK 9 add logging for Jigsaw problems. It is supposed to be written to System.err, which under Web Start is supposed to be the console

      REGRESSION. Last worked in version 9

      ADDITIONAL REGRESSION INFORMATION:
      java version "9-ea"
      Java(TM) SE Runtime Environment (build 9-ea+174)
      Java HotSpot(TM) Server VM (build 9-ea+174, mixed mode, emulated-client)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Enable logging & tracing in Java Control Panel->Advanced->Debugging
      2. Compile the attached application into a JAR file
      3. Sign the JAR file, give run permissions with a deployment rule set
      4. Run as a JWS application

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The application should print

      WARNING: --permit-illegal-access will be removed in the next major release
      "OpenModuleTest"/
      Testing stderr
      WARNING: Illegal access by OpenModuleTest (jar://test.jar!OpenModuleTest) to field java.util.TreeMap.comparator (permitted by --permit-illegal-access)
      OK
      ACTUAL -
      Only the lines
      Test stderr
      OK

      are printed

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      test.jnlp
      =======

      <?xml version="1.0" encoding="utf-8"?>
        <jnlp spec="6.0+" codebase="http://example.com/webstart" href="test.jnlp">
          <information>
            <title>Test app</title>
            <vendor>Anon</vendor>
            <offline-allowed/>
          </information>
          <security>
              <all-permissions/>
          </security>
          <update check="always" policy="always" />
          <resources>
            <j2se version="1.9" java-vm-args="--permit-illegal-access --add-opens=java.base/java.util=ALL-UNNAMED"/>
            <jar href="test.jar" main="true"/>
          </resources>

          <application-desc main-class="OpenModuleTest"/>
        </jnlp>


      OpenModuleTest.java
      =================

      import java.lang.reflect.Field;
      import java.util.Comparator;
      import java.util.TreeMap;

      public class OpenModuleTest {
           public static void main(String... args) {
              System.err.println("Testing stderr");
               for (Field field : TreeMap.class.getDeclaredFields()) {
                   if (field.getType() == Comparator.class) {
                       field.setAccessible(true);
                       break;
                   }

               }

               System.out.println("OK");
           }
      }

      ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                almatvee Alexander Matveev
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: