JDK-8193711 : Launching JWS applet the default download progress dialog only shows if the java console is enabled
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 8u151
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: other
  • CPU: x86
  • Submitted: 2017-12-15
  • Updated: 2019-01-14
  • Resolved: 2018-05-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8u192 b01Fixed
Description
FULL PRODUCT VERSION :
1.8.0_151

ADDITIONAL OS VERSION INFORMATION :
windows version 10.0.15063

EXTRA RELEVANT SYSTEM CONFIGURATION :
The problem is more pronounced when launching and downloading over a wide are network

A DESCRIPTION OF THE PROBLEM :
When using java web start jnlp file to launch an applet (applet-desc) the default downloading and verifying dialogs only appears if the java console is enabled. If the console is set to hide or do not start the dialogs are not shown. This is problematic when jars are being downloaded. This bug does not occur for a jws application (application-desc).

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Clear java cache and hide the java console in the java control panel
2. Download jnlp file
3. Double click on jnlp file to launch web start

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
After double clicking the jnlp file and launching web start, the downloading and verifying dialog is displayed as the jars are downloaded. This happens only if the java console is enabled.
ACTUAL -
The initial java splash screen is briefly displayed but then disappears and then it appears nothing is happening while the jars are downloaded

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
Run the following jnlp based on the Oracle Java tutorial Weather Applet

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="https://docs.oracle.com/javase/tutorial/deployment" >
  <information>
    <title>Weather Applet With Custom Progress Bar</title>
    <vendor>Oracle</vendor>
    <description>custom progress bar example</description>    
  </information>
  <resources>
    <j2se version="1.7+"/>
    <jar href="applet/examples/dist/applet_AppletWithCustomProgressIndicator/applet_AppletWithCustomProgressIndicator.jar" main="true" />
    <jar href="applet/examples/dist/applet_CustomProgressIndicator/applet_CustomProgressIndicator.jar" />
    <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/SomeBigJar.jar" />
    <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/IconDemo.jar" />
    <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/SplitPaneDemo.jar" />
    <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/SplitPaneDemo2.jar" />
    <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/TextBatchPrintingDemo.jar" />
    <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/ToolBarDemo.jar" />
    <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/ToolBarDemo2.jar" />
    <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/SwingSet2.jar" />
  </resources>
  <applet-desc
         name="customprogressindicatordemo.WeatherApplet"
         main-class="customprogressindicatordemo.WeatherApplet"
         width="600"
         height="170">
         <param name="tagLine" value="Information straight from the horse's mouth!"/>
     </applet-desc>
</jnlp>
---------- END SOURCE ----------


Comments
The problem occurs when the ConfigEvent.SET_VISIBLE event occurs before the ConfigEvent.APPINFO event in DownloadWindow.HandleEvent(). The APPINFO event creates the progressDialog. The SET_VISIBLE event causes a call to setVisible(true) which sets isVisible to true, even if progressDialog is null , in which case it does not actually set anything visible. All later calls to setVisible(true) do nothing because isVisible is true. It is a simple mater to not set isVisible true (or just set it back to false) when progressDialog is null. This fixes the problem.
22-05-2018

I can also sometimes reproduce with console on - seems to be a race condition in download window event processing
22-05-2018

I can reproduce with 8u171 - just copy the above to foo.jnlp and run "javaws foo.jnlp" with console on I see the download progress windows. with console off I do not.
18-05-2018

cannot reproduce with JDK10
10-01-2018

Additional Information: Please note that the jnlp file provided should be used as the one from the tutorial (https://docs.oracle.com/javase/tutorial/deployment/applet/examples/applet_AppletWithCustomProgressIndicator/src/customprogress_applet.jnlp) is modified to remove the custom progress class. The steps are as follows: 1) Save the following jnlp file as defaultprogress_applet.jnlp by copying the example below: <?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0+" codebase="https://docs.oracle.com/javase/tutorial/deployment" > <information> <title>Weather Applet With Custom Progress Bar</title> <vendor>Oracle</vendor> <description>custom progress bar example</description> </information> <resources> <j2se version="1.7+"/> <jar href="applet/examples/dist/applet_AppletWithCustomProgressIndicator/applet_AppletWithCustomProgressIndicator.jar" main="true" /> <jar href="applet/examples/dist/applet_CustomProgressIndicator/applet_CustomProgressIndicator.jar" /> <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/SomeBigJar.jar" /> <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/IconDemo.jar" /> <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/SplitPaneDemo.jar" /> <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/SplitPaneDemo2.jar" /> <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/TextBatchPrintingDemo.jar" /> <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/ToolBarDemo.jar" /> <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/ToolBarDemo2.jar" /> <jar href="webstart/examples/dist/webstart_AppWithCustomProgressIndicator/lib/SwingSet2.jar" /> </resources> <applet-desc name="customprogressindicatordemo.WeatherApplet" main-class="customprogressindicatordemo.WeatherApplet" width="600" height="170"> <param name="tagLine" value="Information straight from the horse's mouth!"/> </applet-desc> </jnlp> 2) Clear java cache using the java control panel to delete temporary internet files (General Tab). 3) In the java control select "Show Console" (Advanced Tab) 4) Double click the defaultprogress_applet.jnlp to launch jws as created in step 1. 5) The default download progress dialog is displayed as expected. 6) Delete the temporary internet files again and select "Hide Console" from the java control panel. 7) Double click the defaultprogress_applet.jnlp again (created in step 1) 8) Only the initial splash screen is displayed with no download progress dialog.
09-01-2018

According to the description while launching JWS applet, the default download progress dialog is only visible when the Java console is enabled. https://docs.oracle.com/javase/tutorial/deployment/applet/examples/applet_AppletWithCustomProgressIndicator/src/customprogress_applet.jnlp Checked this for reported version 8u151 and couldn't reproduce the issue as reported. See video snipped in the subsequent messages as a reference. Meanwhile, written back to the submitter to reconfirm the exact steps and outcome in detail.
18-12-2017