JDK-6942343 : javaws -offline does not properly launch application that is in the cache
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6u18
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: generic
  • Submitted: 2010-04-08
  • Updated: 2011-02-16
  • Resolved: 2010-06-24
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 6 JDK 7
6u16-crev b01Fixed 7Fixed
Related Reports
Relates :  
Description
Webstart client fails to launch the application from the cache. After webstart client downloads the application files to the client, it fails to launch from command line when specifying the -offline flag.

When trying to run:

javaws -offline http://localhost:8080/ws/BCREDIT/testws/BrokerTec.jnlp

We first see a popup stating "the application has requested to go online. do you want to continue" with ok and cancel buttons.

If you click OK, you then get an "Application Error" stating that "Unable to launch the application".  If you click on the Details button you see:

Exception

CouldNotLoadArgumentException[ Could not load file/URL specified: http://localhost:8080/ws/BCREDIT/testws/BrokerTec.jnlp]
	at com.sun.javaws.Main.launchApp(Unknown Source)
	at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
	at com.sun.javaws.Main$1.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Wrapped Exception

java.net.ConnectException: Connection refused: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(Unknown Source)
	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)

Console
#### Could not load file/URL specified: http://localhost:8080/ws/BCREDIT/testws/BrokerTec.jnlpWrapped Exception

However, if you launch javaws -viewer, you are able to launch the cached application by clicking on the icon for that application.

Customer has seen this problem both with 6u18 as well as 6u19.

Comments
EVALUATION Working on custom revision for ICAP. The fix for 6931553 worked for the customer. However, they need this backported to 6u16. This requires selective application of 6931553 as well as some other related fixes. Applying the below fix to 6u16 http://web-east.east.sun.com/www/webrevs/ngthomas/6931553/webrev/
03-06-2010

WORK AROUND the offline dialog is triggered by the up-front update check specified in the jnlp file. if they are willing to use background update check, the offline dialog will not show. this will enable background update check in JNLP file: <update check="background"/> example: http://javaweb.sfbay.sun.com/~ngthomas/shortcut/drawoffline_background.jnlp (this one uses background update check - no "switch to online" dialog will be shown in this case when launching from cache) Also, if they just launch without -offline swtich, it should work too. As long as <offline-allowed/> is specified, application should be able to launch offline as long as everything is cached.
09-04-2010