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

Java9 Web Start will not run legacy reflection code by default

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      linux

      Description

      FULL PRODUCT VERSION :
      java version "9"
      Java(TM) SE Runtime Environment (build 9+181)
      Java HotSpot(TM) Server VM (build 9+181, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux smmlaptop 4.2.0-42-generic #49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
      I created a simple application (attached) that uses Reflection to call setDesktopProperty(String, Object) on java.awt.Toolkit. This idea was taken from a workaround in our application.

      I realize that the ability to implement workarounds in this manner is on life support now (Java 10?), but for maintaining backwards compatibility with legacy applications and to give us maintainers of older applications more time to migrate our code, Java 9 runs with –permit-illegal-access by default. However Java Web Start does not, as my test case demonstrates. This seems like an oversight by Oracle.

      If you run my test case from the command line, it passes and works correctly with the expected warning:

      Hello World
      GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
      WARNING: An illegal reflective access operation has occurred
      WARNING: Illegal reflective access by Java9BreaksWhenTest (file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar) to method java.awt.Toolkit.setDesktopProperty(java.lang.String,java.lang.Object)
      WARNING: Please consider reporting this to the maintainers of Java9BreaksWhenTest
      WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
      WARNING: All illegal access operations will be denied in a future release
      desktop Properties changed.

      However, if I run it from Java Web Start, it fails every time with:

      Java Web Start 12.0.0.0
      Using JRE version 9+181 Java HotSpot(TM) Server VM
      JRE expiration date: 2/3/18, 12:00 AM
      User home directory = /home/smm
      ----------------------------------------------------
      c: clear console window
      f: finalize objects on finalization queue
      g: garbage collect
      h: display this help message
      m: print memory usage
      o: trigger logging
      p: reload proxy configuration
      q: hide console
      r: reload policy configuration
      s: dump system and deployment properties
      t: dump thread list
      v: dump thread stack
      0-5: set trace level to <n>
      ----------------------------------------------------
      basic: Java part started
      basic: jnlpx.jvm: /usr/lib/jvm/jdk1.9.0_181_ea/bin/java
      basic: jnlpx.remove: false
      basic: jnlpx.heapsize: null
      network: Loading user-defined proxy configuration ...
      network: Done.
      network: Loading proxy configuration from Netscape Navigator ...
      network: Done.
      network: net.proxy.loading.system
      network: Done.
      network: Proxy Configuration: System Proxy Configuration
      basic: Using UTF-8 to encode arguments.
      basic: Running JVMParams: [JVMParameters: isSecure: true, args:]
      -> [JVMParameters: isSecure: true, args:]
      basic: XMLParser with _source:
      <?xml version="1.0" encoding="UTF-8"?>
      <jnlp spec="1.0+" codebase="file:///home/smm/hcs/testcode" href="java9BreaksWhenTest.jnlp">
          <information>
              <title>Java 9 Breaks When Test</title>
              <vendor>HCS</vendor>
              <homepage href="http://hcs.us.com"/>
              <description>Java 9 Breaks When Test</description>
              <description kind="short">Java 9 Breaks When Test</description>
            </information>
          <security><all-permissions/></security>
          <update check="timeout" policy="always"/>
          <resources>
              <j2se version="1.5+" java-vm-args="-Xmx128m" />
              <jar href="Java9BreaksWhenTest.jar" main="true" download="eager"/>
          </resources>
          <application-desc main-class="Java9BreaksWhenTest">
          </application-desc>
      </jnlp>
      temp: returning LaunchDesc from XMLFormat.parse():

      <jnlp spec="1.0+" codebase="file:/home/smm/hcs/testcode/" href="file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp">
        <information>
          <title>Java 9 Breaks When Test</title>
          <vendor>HCS</vendor>
          <homepage href="http://hcs.us.com"/>
          <description>Java 9 Breaks When Test</description>
          <description kind="short">Java 9 Breaks When Test</description>
        </information>
        <security>
          <all-permissions/>
        </security>
        <update check="timeout" policy="always"/>
        <resources>
          <java java-vm-args="-Xmx128m" version="1.5+"/>
          <jar href="file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar" download="eager" main="true"/>
        </resources>
        <application-desc type="Java" main-class="Java9BreaksWhenTest"/>
      </jnlp>
      network: prepareToLaunch: offlineOnly=false
      cache: In-place upgrading old version 605 file: /home/smm/.java/deployment/cache/6.0/14/2431de0e-42249a33.idx
      cache: Trying to update in place /home/smm/.java/deployment/cache/6.0/14/2431de0e-42249a33.idx
      cache: Upgrade writing to disk for /home/smm/.java/deployment/cache/6.0/14/2431de0e-42249a33
      cache: Upgrade of entry done
      network: Cache entry found [url: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp, version: null]
      cache: Adding MemoryCache entry: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 1
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 2
      cache: Resource file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp has expired.
      network: ResponseCode for file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp : 200
      network: Encoding for file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp : null
      CacheEntry[file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp]: updateAvailable=true,lastModified=Sat Feb 23 12:27:12 CST 3125641,length=50069504
      cache: Resource file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp has expired.
      network: ResponseCode for file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp : 200
      network: Encoding for file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp : null
      network: Server response: (length: 764, lastModified: Wed Aug 30 12:07:42 CDT 2017, downloadVersion: null, mimeType: application/x-java-jnlp-file)
      network: Downloading resource: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      Content-Length: 764
      Content-Encoding: null
      network: Wrote URL file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp to File /home/smm/.java/deployment/cache/6.0/14/2431de0e-7f7e061e-temp
      network: Cache: Enable a new CacheEntry: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      network: Remove cache entry: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: MemoryCache: removed entry file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      network: Downloaded file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp: /home/smm/.java/deployment/cache/6.0/14/2431de0e-7f7e061e
      cache: Adding MemoryCache entry: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 1
      basic: XMLParser with _source:
      <?xml version="1.0" encoding="UTF-8"?>
      <jnlp spec="1.0+" codebase="file:///home/smm/hcs/testcode" href="java9BreaksWhenTest.jnlp">
          <information>
              <title>Java 9 Breaks When Test</title>
              <vendor>HCS</vendor>
              <homepage href="http://hcs.us.com"/>
              <description>Java 9 Breaks When Test</description>
              <description kind="short">Java 9 Breaks When Test</description>
            </information>
          <security><all-permissions/></security>
          <update check="timeout" policy="always"/>
          <resources>
              <j2se version="1.5+" java-vm-args="-Xmx128m" />
              <jar href="Java9BreaksWhenTest.jar" main="true" download="eager"/>
          </resources>
          <application-desc main-class="Java9BreaksWhenTest">
          </application-desc>
      </jnlp>
      temp: returning LaunchDesc from XMLFormat.parse():

      <jnlp spec="1.0+" codebase="file:/home/smm/hcs/testcode/" href="file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp">
        <information>
          <title>Java 9 Breaks When Test</title>
          <vendor>HCS</vendor>
          <homepage href="http://hcs.us.com"/>
          <description>Java 9 Breaks When Test</description>
          <description kind="short">Java 9 Breaks When Test</description>
        </information>
        <security>
          <all-permissions/>
        </security>
        <update check="timeout" policy="always"/>
        <resources>
          <java java-vm-args="-Xmx128m" version="1.5+"/>
          <jar href="file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar" download="eager" main="true"/>
        </resources>
        <application-desc type="Java" main-class="Java9BreaksWhenTest"/>
      </jnlp>
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 2
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 3
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 4
      network: isUpdated: true
      basic: not using applet lifecycle
      basic: not using applet lifecycle
      basic: Launcher: isInstaller: false, isRelaunch: false, isImport(): false, java.home:/usr/lib/jvm/jdk1.9.0_181_ea, Running JRE: JREInfo for index 2:
          platform is: 9
          product is: 9
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.9.0_181_ea/bin/java
          args is:
          native platform is: Linux, i386 [ x86, 32bit ]
          JavaFX runtime is: JavaFX 9 at: null
          enabled is: true
          registered is: true
          system is: false

      basic: JREInfos
      basic:
      JREInfo: 4 entries
      basic: JREInfo 0:
      basic: JREInfo (not in list):
          platform is: 1.8
          product is: 1.8.0_51
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.8.0_51/jre/bin/java
          args is:
          native platform is: Linux, amd64 [ x86_64, 64bit ]
          JavaFX runtime is: JavaFX 1.8.0_51 at: /usr/lib/jvm/jdk1.8.0_51/jre/lib/ext/
          enabled is: true
          registered is: true
          system is: false

      basic: JREInfo 1:
      basic: JREInfo (not in list):
          platform is: 1.8
          product is: 1.8.0_65
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.8.0_65/jre/bin/java
          args is:
          native platform is: Linux, amd64 [ x86_64, 64bit ]
          JavaFX runtime is: JavaFX 1.8.0_65 at: /usr/lib/jvm/jdk1.8.0_65/jre/lib/ext/
          enabled is: true
          registered is: true
          system is: false

      basic: JREInfo 2:
      basic: JREInfo for index 2:
          platform is: 9
          product is: 9
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.9.0_181_ea/bin/java
          args is:
          native platform is: Linux, i386 [ x86, 32bit ]
          JavaFX runtime is: JavaFX 9 at: null
          enabled is: true
          registered is: true
          system is: false

      basic: JREInfo 3:
      basic: JREInfo for index 3:
          platform is: 9
          product is: 9
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.9.0_181_ea/bin/java
          args is:
          native platform is: Linux, i386 [ x86, 32bit ]
          JavaFX runtime is: JavaFX 9 at: null
          enabled is: true
          registered is: false
          system is: true

      security: --- parseCommandLine converted : -Xmx128m
      into:
      [-Xmx128m]
      security: --- parseCommandLine converted : -Xmx128m
      into:
      [-Xmx128m]
      basic: LaunchDesc.selectJRE( returning selected jre: JREInfo for index 2:
          platform is: 9
          product is: 9
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.9.0_181_ea/bin/java
          args is:
          native platform is: Linux, i386 [ x86, 32bit ]
          JavaFX runtime is: JavaFX 9 at: null
          enabled is: true
          registered is: true
          system is: false

      basic: LaunchDesc location: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 3
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 2
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 1
      cache: delayedRemoveResource: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      security: Security check for progress jars: allSigned=true
      basic: Offline mode: false
      IsInCache: false
      forceUpdate: true
      needUpdate: true
      IsInstaller: false
      network: Total size to download: -1
      cache: In-place upgrading old version 605 file: /home/smm/.java/deployment/cache/6.0/40/23626f68-4de57dda.idx
      cache: Trying to update in place /home/smm/.java/deployment/cache/6.0/40/23626f68-4de57dda.idx
      cache: Upgrade writing to disk for /home/smm/.java/deployment/cache/6.0/40/23626f68-4de57dda
      security: Blacklist revocation check is enabled
      security: blacklist: created: NEED_LOAD, lastModified: 1504113931000
      security: blacklist: check contains Pq5IzpMK/o5sYLk4oXd4DFmL1ZI52v4l9VccdEMNnpg=, state now NEED_LOAD
      security: blacklist: loadCache
      security: blacklist: not found in cache
      security: Trusted libraries list check is enabled
      security: Trusted libraries list file not found
      cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
      cache: Upgrade of entry done
      network: Cache entry found [url: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar, version: null]
      cache: Adding MemoryCache entry: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: Resource file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar has expired.
      network: ResponseCode for file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar : 200
      network: Encoding for file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar : null
      CacheEntry[file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar]: updateAvailable=true,lastModified=Sat Dec 20 17:45:04 CST 3125642,length=182321152
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 1
      cache: Resource file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar has expired.
      network: ResponseCode for file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar : 200
      network: Encoding for file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar : null
      network: Server response: (length: 2782, lastModified: Wed Aug 30 12:22:19 CDT 2017, downloadVersion: null, mimeType: application/x-java-archive)
      network: Downloading resource: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      Content-Length: 2,782
      Content-Encoding: null
      network: Wrote URL file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar to File /home/smm/.java/deployment/cache/6.0/40/23626f68-3c969016-temp
      security: blacklist: check contains Pq5IzpMK/o5sYLk4oXd4DFmL1ZI52v4l9VccdEMNnpg=, state now IN_MEMORY
      security: blacklist: not found in cache
      security: Trusted libraries list file not found
      cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
      network: Cache: Enable a new CacheEntry: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      network: Remove cache entry: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: MemoryCache: removed entry file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      network: Downloaded file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar: /home/smm/.java/deployment/cache/6.0/40/23626f68-3c969016
      cache: Adding MemoryCache entry: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 1
      network: Download Progress: jarsDone: 1
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 2
      cache: Cancel delay cleanup: URL: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp | /home/smm/.java/deployment/cache/6.0/14/2431de0e-7f7e061e.idx
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 3
      security: Validating cached jar url=file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar ffile=/home/smm/.java/deployment/cache/6.0/40/23626f68-3c969016 com.sun.deploy.cache.CachedJarFile@12a5b58
      security: Missing Application-Library-Allowable-Codebase manifest attribute for: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      security: Istrusted: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp false
      security: Accessing keys and certificate in Mozilla user profile: null
      security: Missing Application-Library-Allowable-Codebase manifest attribute for: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      security: Loading Deployment certificates from /home/smm/.java/deployment/security/trusted.certs
      security: Loaded Deployment certificates from /home/smm/.java/deployment/security/trusted.certs
      security: Loading certificates from Deployment session certificate store
      security: Loaded certificates from Deployment session certificate store
      security: Loading certificates from Deployment session certificate store
      security: Loaded certificates from Deployment session certificate store
      security: Loading certificates from Deployment session certificate store
      security: Loaded certificates from Deployment session certificate store
      security: Loading certificates from Deployment session certificate store
      security: Loaded certificates from Deployment session certificate store
      security: Validate the certificate chain using CertPath API
      security: The certificate has expired, need to check timestamping info
      security: No timestamping info available
      security: Loading Root CA certificates from /usr/lib/jvm/jdk1.9.0_181_ea/lib/security/cacerts
      security: Loaded Root CA certificates from /usr/lib/jvm/jdk1.9.0_181_ea/lib/security/cacerts
      security: Obtain certificate collection in Root CA certificate store
      security: Obtain certificate collection in Root CA certificate store
      security: Obtain certificate collection in Root CA certificate store
      security: Obtain certificate collection in Root CA certificate store
      security: Loaded blacklisted.certs file: /home/smm/.java/deployment/security/blacklisted.certs
      security: SHA-256Certificate finger print: 1037DBFCD0E7C3F9230A7FFBBEA9F745437A3C1AB4C83976D3D90D3AD3B75699
      security: SHA-256Certificate finger print: 1037DBFCD0E7C3F9230A7FFBBEA9F745437A3C1AB4C83976D3D90D3AD3B75699
      security: The OCSP support is enabled
      security: The CRL support is enabled
      security: Saving certificates in Deployment session certificate store
      security: Saved certificates in Deployment session certificate store
      security: Verifying permission attribute in main jar: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 4
      security: SHA-256Certificate finger print: 1037DBFCD0E7C3F9230A7FFBBEA9F745437A3C1AB4C83976D3D90D3AD3B75699
      security: Mark trusted: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      basic: passing security checks; secureArgs:true, allSigned:false
      basic: trusted app: true, -secure=false
      basic: JREMatcher:
        JREDesc: JREDesc[version 1.5+, versionType=1, secure=false, heap=-1--1, args=-Xmx128m, href=null, null, null]
        JREInfo: JREInfo for index 2:
          platform is: 9
          product is: 9
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.9.0_181_ea/bin/java
          args is:
          native platform is: Linux, i386 [ x86, 32bit ]
          JavaFX runtime is: JavaFX 9 at: null
          enabled is: true
          registered is: true
          system is: false

        Init Heap: -1
        Max Heap: 134217728
        Satisfying: true, true
        SatisfyingVersion: true
        SatisfyingJVMArgs: true, true
        SatisfyingSecure: true
        Selected JVMParam: [JVMParameters: isSecure: true, args:]
        Running JVMParam: [JVMParameters: isSecure: true, args:]
      basic: continuing launch in this VM
      security: JUT Record:
          javaws application
          file:/home/smm/hcs/testcode/: sourceURL=file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp app_model=eJx9U81u00AQnvyUpKQUKRUCgZAsVATi4L2BKk4hqkQqF6I4wBEtzrZ2sL3L7jg4HCrxEkgceAPegzviETgh8QZIMGs7TSSa+LD27n7zzffNjL/+hi2j4VYgE9dkqTsRKpZzV4sTt6fUsZyIGMqnVofLHrQDOnrDjUDY9aZ8xlkqkL0YeY896EyECXSkMJIpQre8jnl6ynzUUXpKkK7IUaSGACNhZKYDYRCulcgMo5j1tOZzLzJI4J0p1+ewd3AGDcofy4DbBHZf82A74VHaj7kpAHUKMiLIdIRzqx3hgUfOGDljpTNGztjC2b6/gqWEWxhhLCqiJs4VEdzZSDAmDAVemol0InURmSuq54515FJpXCrNp7uPHt7881M3oDWAdshN2KfgATSV1EgWeIahtDIWmU+ipYpQGqy+20pLlIGMq32DpFQp/1YPAiBcZ6FMBDNJwsLAMKQa264xi93Gkl7lhDsikc6B80QL/tY4r0KROmMCk/69Qr/tiHvekfzj99ufv/EvDaiRdhN9ELmyg/G+ade8aMAVOyjFQY1Y7m2Yqv2jZXOXE1b/v8OtmdCm2tri2ndr4bey5K5xbA0elPasO2vOpaEqouzSUbkqhbd+/HJerjCyNYzTixjTWK1SIuxdkPhMw/1N9Vidxaog0KW6atgtmmF/JPcwzZLVS4Vwted5r4eHo+OB7w+eP/PX95UUOJsU2GFeJbd2biB0esOhN+j3xsSO0Hja9/8BO4xX+w==
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 2
      basic: not using applet lifecycle
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 5
      basic: Main-class: Java9BreaksWhenTest
      security: JAVAWS AppPolicy Permission requested for: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      security: Missing Application-Library-Allowable-Codebase manifest attribute for: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      security: Istrusted: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp true
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 6
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 7
      Hello World
      java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at jdk.javaws@9/com.sun.javaws.Launcher.executeApplication(Launcher.java:1741)
      at jdk.javaws@9/com.sun.javaws.Launcher.executeMainClass(Launcher.java:1677)
      at jdk.javaws@9/com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1525)
      at jdk.javaws@9/com.sun.javaws.Launcher.run(Launcher.java:158)
      at java.base/java.lang.Thread.run(Thread.java:844)
      Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final void java.awt.Toolkit.setDesktopProperty(java.lang.String,java.lang.Object) accessible: module java.desktop does not "opens java.awt" to unnamed module @14ad6b8
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:337)
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:281)
      at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)
      at java.base/java.lang.reflect.Method.setAccessible(Method.java:192)
      at Java9BreaksWhenTest.main(Java9BreaksWhenTest.java:26)
      ... 9 more
      #### Java Web Start Error:
      #### Unable to make protected final void java.awt.Toolkit.setDesktopProperty(java.lang.String,java.lang.Object) accessible: module java.desktop does not "opens java.awt" to unnamed module @14ad6b8
      java.lang.reflect.InaccessibleObjectException: Unable to make protected final void java.awt.Toolkit.setDesktopProperty(java.lang.String,java.lang.Object) accessible: module java.desktop does not "opens java.awt" to unnamed module @14ad6b8
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:337)
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:281)
      at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)
      at java.base/java.lang.reflect.Method.setAccessible(Method.java:192)
      at Java9BreaksWhenTest.main(Java9BreaksWhenTest.java:26)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at jdk.javaws@9/com.sun.javaws.Launcher.executeApplication(Launcher.java:1741)
      at jdk.javaws@9/com.sun.javaws.Launcher.executeMainClass(Launcher.java:1677)
      at jdk.javaws@9/com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1525)
      at jdk.javaws@9/com.sun.javaws.Launcher.run(Launcher.java:158)
      at java.base/java.lang.Thread.run(Thread.java:844)
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 6
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 5
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 4
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 3
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 2
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 1
      cache: delayedRemoveResource: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 1
      cache: delayedRemoveResource: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: MemoryCache: removed entry file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: MemoryCache: removed entry file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      I've attached the source code, MANIFEST file and JNLP file.

      1) Build the source code into a class file.
      2) Build a jar file with that class file and the MANIFEST file.
      3) Sign the jar file with a trusted certificate.
      4) Run the jar file with Java. It passes.
      5) Run the jar file with JavaWS and the JNLP file (adjusting paths as needed) and it fails.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Hello World
      GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
      WARNING: An illegal reflective access operation has occurred
      WARNING: Illegal reflective access by Java9BreaksWhenTest (file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar) to method java.awt.Toolkit.setDesktopProperty(java.lang.String,java.lang.Object)
      WARNING: Please consider reporting this to the maintainers of Java9BreaksWhenTest
      WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
      WARNING: All illegal access operations will be denied in a future release
      desktop Properties changed.
      ACTUAL -
      Java Web Start 12.0.0.0
      Using JRE version 9+181 Java HotSpot(TM) Server VM
      JRE expiration date: 2/3/18, 12:00 AM
      User home directory = /home/smm
      ----------------------------------------------------
      c: clear console window
      f: finalize objects on finalization queue
      g: garbage collect
      h: display this help message
      m: print memory usage
      o: trigger logging
      p: reload proxy configuration
      q: hide console
      r: reload policy configuration
      s: dump system and deployment properties
      t: dump thread list
      v: dump thread stack
      0-5: set trace level to <n>
      ----------------------------------------------------
      basic: Java part started
      basic: jnlpx.jvm: /usr/lib/jvm/jdk1.9.0_181_ea/bin/java
      basic: jnlpx.remove: false
      basic: jnlpx.heapsize: null
      network: Loading user-defined proxy configuration ...
      network: Done.
      network: Loading proxy configuration from Netscape Navigator ...
      network: Done.
      network: net.proxy.loading.system
      network: Done.
      network: Proxy Configuration: System Proxy Configuration
      basic: Using UTF-8 to encode arguments.
      basic: Running JVMParams: [JVMParameters: isSecure: true, args:]
      -> [JVMParameters: isSecure: true, args:]
      basic: XMLParser with _source:
      <?xml version="1.0" encoding="UTF-8"?>
      <jnlp spec="1.0+" codebase="file:///home/smm/hcs/testcode" href="java9BreaksWhenTest.jnlp">
          <information>
              <title>Java 9 Breaks When Test</title>
              <vendor>HCS</vendor>
              <homepage href="http://hcs.us.com"/>
              <description>Java 9 Breaks When Test</description>
              <description kind="short">Java 9 Breaks When Test</description>
            </information>
          <security><all-permissions/></security>
          <update check="timeout" policy="always"/>
          <resources>
              <j2se version="1.5+" java-vm-args="-Xmx128m" />
              <jar href="Java9BreaksWhenTest.jar" main="true" download="eager"/>
          </resources>
          <application-desc main-class="Java9BreaksWhenTest">
          </application-desc>
      </jnlp>
      temp: returning LaunchDesc from XMLFormat.parse():

      <jnlp spec="1.0+" codebase="file:/home/smm/hcs/testcode/" href="file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp">
        <information>
          <title>Java 9 Breaks When Test</title>
          <vendor>HCS</vendor>
          <homepage href="http://hcs.us.com"/>
          <description>Java 9 Breaks When Test</description>
          <description kind="short">Java 9 Breaks When Test</description>
        </information>
        <security>
          <all-permissions/>
        </security>
        <update check="timeout" policy="always"/>
        <resources>
          <java java-vm-args="-Xmx128m" version="1.5+"/>
          <jar href="file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar" download="eager" main="true"/>
        </resources>
        <application-desc type="Java" main-class="Java9BreaksWhenTest"/>
      </jnlp>
      network: prepareToLaunch: offlineOnly=false
      cache: In-place upgrading old version 605 file: /home/smm/.java/deployment/cache/6.0/14/2431de0e-42249a33.idx
      cache: Trying to update in place /home/smm/.java/deployment/cache/6.0/14/2431de0e-42249a33.idx
      cache: Upgrade writing to disk for /home/smm/.java/deployment/cache/6.0/14/2431de0e-42249a33
      cache: Upgrade of entry done
      network: Cache entry found [url: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp, version: null]
      cache: Adding MemoryCache entry: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 1
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 2
      cache: Resource file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp has expired.
      network: ResponseCode for file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp : 200
      network: Encoding for file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp : null
      CacheEntry[file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp]: updateAvailable=true,lastModified=Sat Feb 23 12:27:12 CST 3125641,length=50069504
      cache: Resource file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp has expired.
      network: ResponseCode for file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp : 200
      network: Encoding for file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp : null
      network: Server response: (length: 764, lastModified: Wed Aug 30 12:07:42 CDT 2017, downloadVersion: null, mimeType: application/x-java-jnlp-file)
      network: Downloading resource: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      Content-Length: 764
      Content-Encoding: null
      network: Wrote URL file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp to File /home/smm/.java/deployment/cache/6.0/14/2431de0e-7f7e061e-temp
      network: Cache: Enable a new CacheEntry: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      network: Remove cache entry: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: MemoryCache: removed entry file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      network: Downloaded file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp: /home/smm/.java/deployment/cache/6.0/14/2431de0e-7f7e061e
      cache: Adding MemoryCache entry: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 1
      basic: XMLParser with _source:
      <?xml version="1.0" encoding="UTF-8"?>
      <jnlp spec="1.0+" codebase="file:///home/smm/hcs/testcode" href="java9BreaksWhenTest.jnlp">
          <information>
              <title>Java 9 Breaks When Test</title>
              <vendor>HCS</vendor>
              <homepage href="http://hcs.us.com"/>
              <description>Java 9 Breaks When Test</description>
              <description kind="short">Java 9 Breaks When Test</description>
            </information>
          <security><all-permissions/></security>
          <update check="timeout" policy="always"/>
          <resources>
              <j2se version="1.5+" java-vm-args="-Xmx128m" />
              <jar href="Java9BreaksWhenTest.jar" main="true" download="eager"/>
          </resources>
          <application-desc main-class="Java9BreaksWhenTest">
          </application-desc>
      </jnlp>
      temp: returning LaunchDesc from XMLFormat.parse():

      <jnlp spec="1.0+" codebase="file:/home/smm/hcs/testcode/" href="file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp">
        <information>
          <title>Java 9 Breaks When Test</title>
          <vendor>HCS</vendor>
          <homepage href="http://hcs.us.com"/>
          <description>Java 9 Breaks When Test</description>
          <description kind="short">Java 9 Breaks When Test</description>
        </information>
        <security>
          <all-permissions/>
        </security>
        <update check="timeout" policy="always"/>
        <resources>
          <java java-vm-args="-Xmx128m" version="1.5+"/>
          <jar href="file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar" download="eager" main="true"/>
        </resources>
        <application-desc type="Java" main-class="Java9BreaksWhenTest"/>
      </jnlp>
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 2
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 3
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 4
      network: isUpdated: true
      basic: not using applet lifecycle
      basic: not using applet lifecycle
      basic: Launcher: isInstaller: false, isRelaunch: false, isImport(): false, java.home:/usr/lib/jvm/jdk1.9.0_181_ea, Running JRE: JREInfo for index 2:
          platform is: 9
          product is: 9
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.9.0_181_ea/bin/java
          args is:
          native platform is: Linux, i386 [ x86, 32bit ]
          JavaFX runtime is: JavaFX 9 at: null
          enabled is: true
          registered is: true
          system is: false

      basic: JREInfos
      basic:
      JREInfo: 4 entries
      basic: JREInfo 0:
      basic: JREInfo (not in list):
          platform is: 1.8
          product is: 1.8.0_51
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.8.0_51/jre/bin/java
          args is:
          native platform is: Linux, amd64 [ x86_64, 64bit ]
          JavaFX runtime is: JavaFX 1.8.0_51 at: /usr/lib/jvm/jdk1.8.0_51/jre/lib/ext/
          enabled is: true
          registered is: true
          system is: false

      basic: JREInfo 1:
      basic: JREInfo (not in list):
          platform is: 1.8
          product is: 1.8.0_65
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.8.0_65/jre/bin/java
          args is:
          native platform is: Linux, amd64 [ x86_64, 64bit ]
          JavaFX runtime is: JavaFX 1.8.0_65 at: /usr/lib/jvm/jdk1.8.0_65/jre/lib/ext/
          enabled is: true
          registered is: true
          system is: false

      basic: JREInfo 2:
      basic: JREInfo for index 2:
          platform is: 9
          product is: 9
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.9.0_181_ea/bin/java
          args is:
          native platform is: Linux, i386 [ x86, 32bit ]
          JavaFX runtime is: JavaFX 9 at: null
          enabled is: true
          registered is: true
          system is: false

      basic: JREInfo 3:
      basic: JREInfo for index 3:
          platform is: 9
          product is: 9
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.9.0_181_ea/bin/java
          args is:
          native platform is: Linux, i386 [ x86, 32bit ]
          JavaFX runtime is: JavaFX 9 at: null
          enabled is: true
          registered is: false
          system is: true

      security: --- parseCommandLine converted : -Xmx128m
      into:
      [-Xmx128m]
      security: --- parseCommandLine converted : -Xmx128m
      into:
      [-Xmx128m]
      basic: LaunchDesc.selectJRE( returning selected jre: JREInfo for index 2:
          platform is: 9
          product is: 9
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.9.0_181_ea/bin/java
          args is:
          native platform is: Linux, i386 [ x86, 32bit ]
          JavaFX runtime is: JavaFX 9 at: null
          enabled is: true
          registered is: true
          system is: false

      basic: LaunchDesc location: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 3
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 2
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 1
      cache: delayedRemoveResource: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      security: Security check for progress jars: allSigned=true
      basic: Offline mode: false
      IsInCache: false
      forceUpdate: true
      needUpdate: true
      IsInstaller: false
      network: Total size to download: -1
      cache: In-place upgrading old version 605 file: /home/smm/.java/deployment/cache/6.0/40/23626f68-4de57dda.idx
      cache: Trying to update in place /home/smm/.java/deployment/cache/6.0/40/23626f68-4de57dda.idx
      cache: Upgrade writing to disk for /home/smm/.java/deployment/cache/6.0/40/23626f68-4de57dda
      security: Blacklist revocation check is enabled
      security: blacklist: created: NEED_LOAD, lastModified: 1504113931000
      security: blacklist: check contains Pq5IzpMK/o5sYLk4oXd4DFmL1ZI52v4l9VccdEMNnpg=, state now NEED_LOAD
      security: blacklist: loadCache
      security: blacklist: not found in cache
      security: Trusted libraries list check is enabled
      security: Trusted libraries list file not found
      cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
      cache: Upgrade of entry done
      network: Cache entry found [url: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar, version: null]
      cache: Adding MemoryCache entry: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: Resource file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar has expired.
      network: ResponseCode for file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar : 200
      network: Encoding for file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar : null
      CacheEntry[file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar]: updateAvailable=true,lastModified=Sat Dec 20 17:45:04 CST 3125642,length=182321152
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 1
      cache: Resource file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar has expired.
      network: ResponseCode for file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar : 200
      network: Encoding for file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar : null
      network: Server response: (length: 2782, lastModified: Wed Aug 30 12:22:19 CDT 2017, downloadVersion: null, mimeType: application/x-java-archive)
      network: Downloading resource: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      Content-Length: 2,782
      Content-Encoding: null
      network: Wrote URL file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar to File /home/smm/.java/deployment/cache/6.0/40/23626f68-3c969016-temp
      security: blacklist: check contains Pq5IzpMK/o5sYLk4oXd4DFmL1ZI52v4l9VccdEMNnpg=, state now IN_MEMORY
      security: blacklist: not found in cache
      security: Trusted libraries list file not found
      cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
      network: Cache: Enable a new CacheEntry: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      network: Remove cache entry: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: MemoryCache: removed entry file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      network: Downloaded file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar: /home/smm/.java/deployment/cache/6.0/40/23626f68-3c969016
      cache: Adding MemoryCache entry: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 1
      network: Download Progress: jarsDone: 1
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 2
      cache: Cancel delay cleanup: URL: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp | /home/smm/.java/deployment/cache/6.0/14/2431de0e-7f7e061e.idx
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 3
      security: Validating cached jar url=file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar ffile=/home/smm/.java/deployment/cache/6.0/40/23626f68-3c969016 com.sun.deploy.cache.CachedJarFile@12a5b58
      security: Missing Application-Library-Allowable-Codebase manifest attribute for: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      security: Istrusted: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp false
      security: Accessing keys and certificate in Mozilla user profile: null
      security: Missing Application-Library-Allowable-Codebase manifest attribute for: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      security: Loading Deployment certificates from /home/smm/.java/deployment/security/trusted.certs
      security: Loaded Deployment certificates from /home/smm/.java/deployment/security/trusted.certs
      security: Loading certificates from Deployment session certificate store
      security: Loaded certificates from Deployment session certificate store
      security: Loading certificates from Deployment session certificate store
      security: Loaded certificates from Deployment session certificate store
      security: Loading certificates from Deployment session certificate store
      security: Loaded certificates from Deployment session certificate store
      security: Loading certificates from Deployment session certificate store
      security: Loaded certificates from Deployment session certificate store
      security: Validate the certificate chain using CertPath API
      security: The certificate has expired, need to check timestamping info
      security: No timestamping info available
      security: Loading Root CA certificates from /usr/lib/jvm/jdk1.9.0_181_ea/lib/security/cacerts
      security: Loaded Root CA certificates from /usr/lib/jvm/jdk1.9.0_181_ea/lib/security/cacerts
      security: Obtain certificate collection in Root CA certificate store
      security: Obtain certificate collection in Root CA certificate store
      security: Obtain certificate collection in Root CA certificate store
      security: Obtain certificate collection in Root CA certificate store
      security: Loaded blacklisted.certs file: /home/smm/.java/deployment/security/blacklisted.certs
      security: SHA-256Certificate finger print: 1037DBFCD0E7C3F9230A7FFBBEA9F745437A3C1AB4C83976D3D90D3AD3B75699
      security: SHA-256Certificate finger print: 1037DBFCD0E7C3F9230A7FFBBEA9F745437A3C1AB4C83976D3D90D3AD3B75699
      security: The OCSP support is enabled
      security: The CRL support is enabled
      security: Saving certificates in Deployment session certificate store
      security: Saved certificates in Deployment session certificate store
      security: Verifying permission attribute in main jar: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 4
      security: SHA-256Certificate finger print: 1037DBFCD0E7C3F9230A7FFBBEA9F745437A3C1AB4C83976D3D90D3AD3B75699
      security: Mark trusted: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      basic: passing security checks; secureArgs:true, allSigned:false
      basic: trusted app: true, -secure=false
      basic: JREMatcher:
        JREDesc: JREDesc[version 1.5+, versionType=1, secure=false, heap=-1--1, args=-Xmx128m, href=null, null, null]
        JREInfo: JREInfo for index 2:
          platform is: 9
          product is: 9
          location is: http://java.sun.com/products/autodl/j2se
          path is: /usr/lib/jvm/jdk1.9.0_181_ea/bin/java
          args is:
          native platform is: Linux, i386 [ x86, 32bit ]
          JavaFX runtime is: JavaFX 9 at: null
          enabled is: true
          registered is: true
          system is: false

        Init Heap: -1
        Max Heap: 134217728
        Satisfying: true, true
        SatisfyingVersion: true
        SatisfyingJVMArgs: true, true
        SatisfyingSecure: true
        Selected JVMParam: [JVMParameters: isSecure: true, args:]
        Running JVMParam: [JVMParameters: isSecure: true, args:]
      basic: continuing launch in this VM
      security: JUT Record:
          javaws application
          file:/home/smm/hcs/testcode/: sourceURL=file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp app_model=eJx9U81u00AQnvyUpKQUKRUCgZAsVATi4L2BKk4hqkQqF6I4wBEtzrZ2sL3L7jg4HCrxEkgceAPegzviETgh8QZIMGs7TSSa+LD27n7zzffNjL/+hi2j4VYgE9dkqTsRKpZzV4sTt6fUsZyIGMqnVofLHrQDOnrDjUDY9aZ8xlkqkL0YeY896EyECXSkMJIpQre8jnl6ynzUUXpKkK7IUaSGACNhZKYDYRCulcgMo5j1tOZzLzJI4J0p1+ewd3AGDcofy4DbBHZf82A74VHaj7kpAHUKMiLIdIRzqx3hgUfOGDljpTNGztjC2b6/gqWEWxhhLCqiJs4VEdzZSDAmDAVemol0InURmSuq54515FJpXCrNp7uPHt7881M3oDWAdshN2KfgATSV1EgWeIahtDIWmU+ipYpQGqy+20pLlIGMq32DpFQp/1YPAiBcZ6FMBDNJwsLAMKQa264xi93Gkl7lhDsikc6B80QL/tY4r0KROmMCk/69Qr/tiHvekfzj99ufv/EvDaiRdhN9ELmyg/G+ade8aMAVOyjFQY1Y7m2Yqv2jZXOXE1b/v8OtmdCm2tri2ndr4bey5K5xbA0elPasO2vOpaEqouzSUbkqhbd+/HJerjCyNYzTixjTWK1SIuxdkPhMw/1N9Vidxaog0KW6atgtmmF/JPcwzZLVS4Vwted5r4eHo+OB7w+eP/PX95UUOJsU2GFeJbd2biB0esOhN+j3xsSO0Hja9/8BO4xX+w==
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 2
      basic: not using applet lifecycle
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 5
      basic: Main-class: Java9BreaksWhenTest
      security: JAVAWS AppPolicy Permission requested for: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      security: Missing Application-Library-Allowable-Codebase manifest attribute for: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      security: Istrusted: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp true
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 6
      cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 7
      Hello World
      java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at jdk.javaws@9/com.sun.javaws.Launcher.executeApplication(Launcher.java:1741)
      at jdk.javaws@9/com.sun.javaws.Launcher.executeMainClass(Launcher.java:1677)
      at jdk.javaws@9/com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1525)
      at jdk.javaws@9/com.sun.javaws.Launcher.run(Launcher.java:158)
      at java.base/java.lang.Thread.run(Thread.java:844)
      Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final void java.awt.Toolkit.setDesktopProperty(java.lang.String,java.lang.Object) accessible: module java.desktop does not "opens java.awt" to unnamed module @14ad6b8
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:337)
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:281)
      at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)
      at java.base/java.lang.reflect.Method.setAccessible(Method.java:192)
      at Java9BreaksWhenTest.main(Java9BreaksWhenTest.java:26)
      ... 9 more
      #### Java Web Start Error:
      #### Unable to make protected final void java.awt.Toolkit.setDesktopProperty(java.lang.String,java.lang.Object) accessible: module java.desktop does not "opens java.awt" to unnamed module @14ad6b8
      java.lang.reflect.InaccessibleObjectException: Unable to make protected final void java.awt.Toolkit.setDesktopProperty(java.lang.String,java.lang.Object) accessible: module java.desktop does not "opens java.awt" to unnamed module @14ad6b8
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:337)
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:281)
      at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)
      at java.base/java.lang.reflect.Method.setAccessible(Method.java:192)
      at Java9BreaksWhenTest.main(Java9BreaksWhenTest.java:26)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at jdk.javaws@9/com.sun.javaws.Launcher.executeApplication(Launcher.java:1741)
      at jdk.javaws@9/com.sun.javaws.Launcher.executeMainClass(Launcher.java:1677)
      at jdk.javaws@9/com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1525)
      at jdk.javaws@9/com.sun.javaws.Launcher.run(Launcher.java:158)
      at java.base/java.lang.Thread.run(Thread.java:844)
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 6
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 5
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 4
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 3
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 2
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@53ecb046: 1
      cache: delayedRemoveResource: file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar
      cache: Clean up the reference queue: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: deregisterReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@a9db64dd: 1
      cache: delayedRemoveResource: file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: MemoryCache: removed entry file:/home/smm/hcs/testcode/java9BreaksWhenTest.jnlp
      cache: MemoryCache: removed entry file:/home/smm/hcs/testcode/Java9BreaksWhenTest.jar


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      See actual result.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.Toolkit;
      import java.lang.reflect.Method;
      import java.lang.IllegalAccessException;
      import java.lang.reflect.InvocationTargetException;

      public class Java9BreaksWhenTest {

      public static void main(String args[]) throws IllegalAccessException, InvocationTargetException {
      System.out.println("Hello World");

      // Do some dangerous reflection
      Toolkit toolkit = Toolkit.getDefaultToolkit();
      Class c = toolkit.getClass();
      while(true) {
      Method m = null;
      try {
      m = c.getDeclaredMethod("setDesktopProperty", String.class, Object.class);
      } catch (NoSuchMethodException ex) {
                           c = c.getSuperclass();
                           if (c!=null)
                               continue;
               } catch (SecurityException ex) {
      ex.printStackTrace();
               }
                       if (m!=null) {
      m.setAccessible(true);
      m.invoke(toolkit, "awt.font.desktophints", null);
               System.out.println("desktop Properties changed.");
                       }
      break;
                      }
      }
      }

      MANIFEST.MF:
      Manifest-Version: 1.0
      Created-By: 1.8.0_51 (Oracle Corporation)
      Application-Name: Java9BreaksWhenTest
      Name: Java9BreaksWhenTest.class
      Main-Class: Java9BreaksWhenTest
      Permissions: all-permissions
      Codebase: *

      java9BreaksWhenTest.jnlp:
      <?xml version="1.0" encoding="UTF-8"?>
      <jnlp spec="1.0+" codebase="file:///home/smm/hcs/testcode" href="java9BreaksWhenTest.jnlp">
          <information>
              <title>Java 9 Breaks When Test</title>
              <vendor>HCS</vendor>
              <homepage href="http://hcs.us.com"/>
              <description>Java 9 Breaks When Test</description>
              <description kind="short">Java 9 Breaks When Test</description>
            </information>
          <security><all-permissions/></security>
          <update check="timeout" policy="always"/>
          <resources>
              <j2se version="1.5+" java-vm-args="-Xmx128m" />
              <jar href="Java9BreaksWhenTest.jar" main="true" download="eager"/>
          </resources>
          <application-desc main-class="Java9BreaksWhenTest">
          </application-desc>
      </jnlp>

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

        Attachments

          Activity

            People

            • Assignee:
              herrick Andy Herrick
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: