JDK-6911785 : javaws -offline launches appln without any error when the appln is not in cache
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6u18,6u19
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,windows,windows_xp
  • CPU: generic,x86
  • Submitted: 2009-12-18
  • Updated: 2010-09-08
  • Resolved: 2010-03-09
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
6u21 b01Fixed
Related Reports
Duplicate :  
Duplicate :  
Description
Tested platforms : solaris and windows

Install 6u18 b07
remove cache
in the command prompt, launch "javaws -offline http://nicole1.sfbay.sun.com:8080/JavawsMustangIntegTest/demos/notepad.jnlp"
on solaris, notepad appln launches fine without any error
on windows, it asks "the appln has requested to go online. do you want to continue" with ok and cancel buttons.

Expected behavior : Since the appln is not in cache, it should give exception "Cannot download resource. System is offline"

It is a regression

Comments
EVALUATION The following two cases will trigger CacheUpdateRequiredException, which will pop up the offline prompt dialog: 1. LAP forcedupdate check is set is covered by Launcher.prepareToLaunch: _lap = Cache.getLocalApplicationProperties(jnlpUrl); if (offlineOnly && _lap != null && _lap.forceUpdateCheck()) { throw new CacheUpdateRequiredException( "Need to update: force update set in LAP"); } 2. Part of application JAR is missing is covered by Launcher.prepareLaunchFile: //loadedExtensions can be false only if one the following is true // a) we failed to load extensions // b) offline mode was requested and not everything is in cache //In both cases we need to check if we are allowed to start offline // and doublecheck cache state before we can proceed. if (!loadedExtensions) { if (!ld.getInformation().supportsOfflineOperation() || !LaunchDownload.isInCache(ld)) { throw new CacheUpdateRequiredException("Some of required resources are not cached."); } loadedExtensions = true; } (This will also cover the case when the application has more than one jnlp, and second one is missing in cache. CacheUpdateRequiredException will be thrown and we show dialog.) tested with both java/javafx webstart applications. webrev: http://web-east.east.sun.com/www/webrevs/ngthomas/6911785/webrev/ Reason for change in LaunchDescFactory in webrev: If you launch "javaws -offline http://some_jnlp_url", and the jnlp is not in cache, we want to show error dialog right the way. This is the regression bug.
23-02-2010

SUGGESTED FIX http://web-east.east.sun.com/deployment/www/webrevs/ngthomas/6911785/webrev/
17-02-2010

EVALUATION we need to make sure the following two cases work as before: 1. javaws -offline http_url_jnlp_file - if application is cached, should launch without prompt. - if application is not cached, should fail with error dialog "Cannot download resource. System is offline" 2. javaws -offline -localfile path_jnlp_file (this is the case where launching offline via cache viewer) - if application is cached, should launch without prompt. And for cases where application is partially cached, we must do a fresh update check/download on all application resources before application can be started. Network connection is required in this case, and we will prompt user with dialog asking whether they want to go online.
04-02-2010

EVALUATION javaws -offline is not commonly used - not showstopper for 6u18
18-12-2009