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

Enabling JFR support in Java WebStart

    Details

    • Subcomponent:
    • Introduced In Version:
    • CPU:
      generic
    • OS:
      generic

      Description

      A request from the field: is it possible to use JFR in the context of an @ applet/JNLP?
      Trying it currently leads to failure.

      More precisely, it has been found that the only properties specified in the JNLP file that are effectively passed to the client JVM are the supported options as advertised in:
      http://docs.oracle.com/javase/8/docs/technotes/guides/javaws/developersguide/syntax.html#resources
      All other options are silently dropped. These dropped options include the JFR specific options.

      This enhancement is about adding support for the JFR options (and thus introduce support for JFR) in applet/JNLP.
      This includes but is not limited to:
      -XX:+UnlockCommercialFeatures
      -XX:+FlightRecorder
      -XX:StartFlightRecording=...
      -XX:FlightRecorderOptions=...

        Issue Links

          Activity

          Hide
          pabgrall Patrick Abgrall added a comment -
          See also BUG 19792968 - Enabling JFR support in Java WebStart

          http://www.oracle.com/technetwork/java/javase/2col/jmc-relnotes-2004763.html#limt
          Limitations
          JMC does not include or run with a security manager, so a user must ensure to run the JMC client in a secure environment.
          -----
          Although running in a secure environment, this client environment does not meet this advertised limitation.
          Show
          pabgrall Patrick Abgrall added a comment - See also BUG 19792968 - Enabling JFR support in Java WebStart http://www.oracle.com/technetwork/java/javase/2col/jmc-relnotes-2004763.html#limt Limitations JMC does not include or run with a security manager, so a user must ensure to run the JMC client in a secure environment. ----- Although running in a secure environment, this client environment does not meet this advertised limitation.
          Hide
          hirt Marcus Hirt added a comment -
          Just got an e-mail from brian.cox@oracle.com who has a customer requesting the same thing.
          Show
          hirt Marcus Hirt added a comment - Just got an e-mail from brian.cox@oracle.com who has a customer requesting the same thing.
          Hide
          hirt Marcus Hirt added a comment -
          And now an e-mail from peter.doschkinow@oracle.com. Can we have an ETA on this?
          Show
          hirt Marcus Hirt added a comment - And now an e-mail from peter.doschkinow@oracle.com . Can we have an ETA on this?
          Hide
          hirt Marcus Hirt added a comment -
          Workaround, courtesy of Brian Cox:
          A less desirable solution but effective in implementations using a pre 8u40 JVM is to enable the flags in the Java control panel, details below. A word of warning, with these settings all JVM usage going forward will have JFR/JMC enabled web start or not.

          • From Windows Control panel select Java
          • The Java Control Panel is started.
          • Click on the Java Tab and then View…
          • This will open the Java Runtime Environment Settings dialog
          • The dialog will show all JVM’s installed
          • Identify the JVM being used by web start, or repeat for all
          • In the Runtime Parameters you will add the commercial features flight recorder flags:
          -XX:+UnlockCommercialFeatures -XX:+FlightRecorder
          Show
          hirt Marcus Hirt added a comment - Workaround, courtesy of Brian Cox: A less desirable solution but effective in implementations using a pre 8u40 JVM is to enable the flags in the Java control panel, details below. A word of warning, with these settings all JVM usage going forward will have JFR/JMC enabled web start or not. • From Windows Control panel select Java • The Java Control Panel is started. • Click on the Java Tab and then View… • This will open the Java Runtime Environment Settings dialog • The dialog will show all JVM’s installed • Identify the JVM being used by web start, or repeat for all • In the Runtime Parameters you will add the commercial features flight recorder flags: -XX:+UnlockCommercialFeatures -XX:+FlightRecorder
          Hide
          hirt Marcus Hirt added a comment -
          I haven't tried this myself, but wouldn't using the JAVA_TOOL_OPTIONS environment variable be a viable workaround?
          Show
          hirt Marcus Hirt added a comment - I haven't tried this myself, but wouldn't using the JAVA_TOOL_OPTIONS environment variable be a viable workaround?
          Hide
          hirt Marcus Hirt added a comment -
          Another environment variable that may work, and which is ws-specific, is JAVAWS_VM_ARGS. Again, didn't try it.
          Show
          hirt Marcus Hirt added a comment - Another environment variable that may work, and which is ws-specific, is JAVAWS_VM_ARGS. Again, didn't try it.

            People

            • Assignee:
              herrick Andy Herrick
              Reporter:
              pabgrall Patrick Abgrall
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: