PageRenderTime 26ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

/jdk-8u31-docs-all/docs/technotes/guides/javaws/enhancements6.html

https://gitlab.com/PNNutkung/Java-API
HTML | 339 lines | 324 code | 9 blank | 6 comment | 0 complexity | 057996f21a1309fe87219a906e4d30f9 MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" xml:lang=
  4. "en-US">
  5. <head>
  6. <title>enhancements</title>
  7. <link rel="stylesheet" type="text/css" href="../../../technotes/css/guide.css" />
  8. </head>
  9. <body>
  10. <!-- STATIC HEADER -->
  11. <!-- header start -->
  12. <div id="javaseheader">
  13. <div id="javaseheaderlogo">
  14. <img src="../../../images/javalogo.gif"
  15. alt="Java logo" />
  16. </div>
  17. <div id="javaseheaderindex">
  18. <a href=
  19. "../../../index.html">Documentation Contents</a>
  20. </div>
  21. <div class="clear"></div>
  22. </div>
  23. <!-- header end -->
  24. <h2 align="center">&nbsp;</h2>
  25. <h2 align="center">Java Web Start enhancements in version 6</h2>
  26. <h2 align="center"><br /></h2>
  27. <ul>
  28. <li>
  29. <p>JNLP Specification addition of the &lt;update&gt; element with
  30. its &quot;policy&quot; and &quot;check&quot; attributes.</p>
  31. </li>
  32. </ul>
  33. <p style="margin-left: 0.42in">The new &lt;update&gt; element with
  34. its &quot;policy&quot; and &quot;check&quot; attributes is now
  35. supported. The update element describes the applications
  36. preferences on how Java Web Start should check for updates on the
  37. web, and what to do when it is known before launching that an
  38. update is available.<br />
  39. In the previous versions of Java Web Start, the
  40. &lt;offline-allowed&gt; element was overloaded to mean two
  41. things.&nbsp; First, it meant that the application was allowed to
  42. run in &quot;offline&quot; mode. (An application can be run in
  43. offline mode either from the command line by adding the
  44. &quot;-offline&quot; argument, or from the Cache Viewer.)&nbsp;
  45. Second, it meant that attempts to check for update before launching
  46. an application (when not run in offline mode) could time out.&nbsp;
  47. When a check for update times out, the application would be
  48. launched from the cache while the update check continued in the
  49. background.<br />
  50. With the advent of the &lt;update&gt; element and its check
  51. attribute in 6.0, the &lt;offline-allowed&gt; element no longer has
  52. this second meaning.&nbsp; The default values:&nbsp; &lt;update
  53. check=&quot;timeout&quot;/&gt;.&nbsp; which is the same behavior as
  54. previous versions where &lt;offline-allowed&gt; was
  55. specified.&nbsp; For the behavior that previously used whenever
  56. &lt;offline-allowed&gt; was omitted, you need to specify &lt;update
  57. check=&quot;always&quot;/&gt;. A third value &lt;update
  58. check=&quot;background&quot;/&gt; can be specified to always
  59. immediately launch from the cache while spawning a check for update
  60. in the background.&nbsp;&nbsp;&nbsp; The second attribute,
  61. &quot;policy&quot;, is used to determine what to do when it is
  62. known before starting the application that there is an update
  63. available.&nbsp; You can either always get the update, or prompt
  64. the user. The policy attribute values can be either
  65. &quot;always&quot; (this is default) , &quot;prompt-update&quot; or
  66. &quot;prompt-run&quot;.</p>
  67. <ul>
  68. <li>
  69. <p>JNLP Specification relaxation of requirements for the
  70. DownloadService API.</p>
  71. </li>
  72. </ul>
  73. <p style="margin-left: 0.42in">In the previous versions, the URLs
  74. passed as arguments to all of the APIs were restricted to be URLs
  75. to resources listed in the jnlp file(s) of the running
  76. application.&nbsp; This restriction is changed such that there are
  77. no restrictions for signed and trusted code, and the restriction on
  78. untrusted code is not that it be listed in the jnlp file(s), but
  79. only that it be from the same codebase.<br />
  80. Further, URLs to jnlp file(s) themselves are allowed, so that
  81. calling DownloadService.removeResource() can now be used to remove
  82. a whole application from the cache, and
  83. DownloadService.loadResource() can be used to import an
  84. application.<br />
  85. One effect of this change is that resources not listed in any jnlp
  86. file can now be used in an application.&nbsp; For example, after
  87. determining the locale is set to en_xx, an application can then
  88. load resources_en_xx.jar using the DownloadService, without listing
  89. all the available resource jars in the jnlp file. (Allowing you to
  90. dynamically add support for more locales without changing the jnlp
  91. file).</p>
  92. <ul>
  93. <li>
  94. <p>Implementation of a SocketService</p>
  95. </li>
  96. </ul>
  97. <p style="margin-left: 0.42in; margin-bottom: 0in">Another
  98. significant specification change is a clarification in the
  99. definition of the sandbox, that it is only the default sandbox, and
  100. that the implementation is free to prompt the user to allow actions
  101. that wouldn't be allowed by the sandbox.&nbsp; You already saw in
  102. 1.5.0 that this was done for printing, so that just by using the
  103. normal printing api in awt, you could expand the sandbox to allow
  104. the application to access the printer (if the user agreed). In 6.0
  105. this is also done for socket connections, so that if an untrusted
  106. application attempts to connect to a url, the user can be prompted
  107. to allow the connection.</p>
  108. <ul>
  109. <li>
  110. <p>New &lt;java&gt; element in jnlp file to replace &lt;j2se&gt;
  111. element.</p>
  112. </li>
  113. </ul>
  114. <p style="margin-left: 0.42in">For jnlp files that will be used
  115. only with Java Web Start version 6.0 or later, the &lt;java&gt;
  116. element can be used to replace the &lt;j2se&gt; tag.&nbsp; (This is
  117. mainly because the Java Platform Standard Edition is no longer
  118. called j2se.)&nbsp; For backward compatibility, the &lt;j2se&gt;
  119. tag will continue to work.&nbsp; The &lt;java&gt; element will be
  120. identical to the &lt;j2se&gt; element..</p>
  121. <ul>
  122. <li>
  123. <p>The &lt;association&gt; element now may contain the &lt;icon&gt;
  124. and &lt;description&gt; sub-elements.</p>
  125. </li>
  126. </ul>
  127. <p style="margin-left: 0.42in">When creating file extension and
  128. mime type associations with your Java Web Start application, you
  129. can now specify a separate icon to be used for each association (as
  130. opposed to using the default icon for the application).&nbsp; Now,
  131. you can also specify a description.</p>
  132. <ul>
  133. <li>
  134. <p>Jar Indexing is fully supported now, and the JNLPClassLoader is
  135. now an instance of the URLClassLoader.</p>
  136. </li>
  137. </ul>
  138. <p style="margin-left: 0.42in">The JNLPClassLoader was rewritten to
  139. extend URLClassLoader.&nbsp; This gives several powerful
  140. advantages.&nbsp;<br />
  141. First, Jar Indexing is now fully supported.&nbsp; If you have
  142. several jar files, and create a jar index in the main jar file that
  143. indexes all the jar files, you can then mark each additional jar as
  144. lazy, and it will not be downloaded until and unless a resource or
  145. class in it is referenced.&nbsp; This makes the old part and
  146. package elements unnecessary for insuring that lazy jars are not
  147. downloaded prematurely.<br />
  148. Second, since the JNLPClassLoader now extends URLClassLoader, an
  149. Application can call getURLs() to get a list of the jar elements
  150. that are listed in the jnlp files (or have been downloaded using
  151. the DownloadService API, even if not listed in any jnlp file, see
  152. above).<br />
  153. Finally, the URL returned for calls to ClassLoader.getResource() is
  154. now the proper JAR URL of the item on the net.&nbsp; In previous
  155. versions, this URL returned was a jar url of the file url item in
  156. the cache.&nbsp; By extending URLClassLoader, the cached location
  157. (if it exists) is meaningless, and it allows Java Web Start to
  158. operate without caching.</p>
  159. <ul>
  160. <li>
  161. <p>Enhanced icon support.</p>
  162. </li>
  163. </ul>
  164. <p style="margin-left: 0.42in">Java Web Start now supports two new
  165. icon formats, &quot;.png&quot;, and &quot;.ico&quot;.&nbsp; This
  166. allows you to specify an icon that will not need to be translated
  167. into a different format depending on its use.&nbsp; You can also
  168. now specify kind=&quot;shortcut&quot;, and Java Web Start will now
  169. honor the width and height hints. This means if you specify:<br />
  170. &lt;icon kind=&quot;shortcut&quot;
  171. href=&quot;menushortcut.ico&quot; width=&quot;16&quot;
  172. height=&quot;16&quot;/&gt;<br />
  173. &lt;icon kind=&quot;shortcut&quot;
  174. href=&quot;desktopshortcut.ico&quot; width=&quot;32&quot;
  175. height=&quot;32&quot;/&gt;<br />
  176. you can specify separate images for any desktop and menu shortcuts
  177. that are created.&nbsp; (note: for desktop shortcuts, Java Web
  178. Start will use the icon whose size is closer to 32X32, and for menu
  179. shortcuts Java Web Start will use the icon whose size is closer to
  180. 16X16 )</p>
  181. <ul>
  182. <li>
  183. <p>Enhanced support for Add/Remove program entries on Windows.</p>
  184. </li>
  185. </ul>
  186. <p style="margin-left: 0.42in">The Windows Add/Remove program
  187. entries for Java Web Start applications will now include the
  188. publisher, publisher web site, install date, and application icon
  189. from the information block of the jnlp file.</p>
  190. <ul>
  191. <li>
  192. <p>Desktop shortcut tooltips.</p>
  193. </li>
  194. </ul>
  195. <p style="margin-left: 0.42in">Desktop shortcuts created by Java
  196. Web Start will now use the &lt;description&gt; element in the jnlp
  197. file to create a toolkit describing the application.</p>
  198. <ul>
  199. <li>
  200. <p>JNLPDownloadServlet enhancements.</p>
  201. </li>
  202. </ul>
  203. <p style="margin-left: 0.42in">The JnlpDownloadServlet now contains
  204. both a $$hostname and a $$site macro. The $$hostname macro is
  205. expanded to contain the host name. The $$site macro is expanded to
  206. contain the web site address without the WAR context portion.</p>
  207. <ul>
  208. <li>
  209. <p>The list of safe vm args and safe properties has been
  210. expanded.</p>
  211. </li>
  212. </ul>
  213. <p style="margin-left: 0.42in">See the developers guide for the
  214. current list of safe properties and vm args.</p>
  215. <ul>
  216. <li>
  217. <p>Several Command Line Interface (CLI) items have been changed or
  218. added. See the developers guide for the current Javaws CLI.</p>
  219. </li>
  220. </ul>
  221. <h3 align="center">Enhancements Common to Java Web Start and Java
  222. Plug-in</h3>
  223. <ul>
  224. <li>
  225. <p>All dialogs have been redesigned to be more user friendly.</p>
  226. </li>
  227. </ul>
  228. <p style="margin-left: 0.42in">All of the dialogs and screens shown
  229. by Java Web Start and Java Plug-in have been redesigned with help
  230. from the User Experience team to be more user friendly, intuitive,
  231. and accessible.</p>
  232. <ul>
  233. <li>
  234. <p>DownloadEngine and cache consolidation and redesign.</p>
  235. </li>
  236. </ul>
  237. <p style="margin-left: 0.42in">The entire caching mechanism and
  238. download engine has been redesigned and consolidated between Java
  239. Web Start and Java Plug-in.&nbsp;<br />
  240. This brings several new features to Java Web Start, previously
  241. available only in Java Plug-in and vice versa.</p>
  242. <ul>
  243. <li>
  244. <p style="margin-bottom: 0in">Caching can be disabled now entirely
  245. via the Java Control Panel.<br /></p>
  246. </li>
  247. <li>The cache max size set in the JCP is now honored in Java Web
  248. Start, and a cleanup thread may be started by Java Web Start to
  249. removed LRU items from the cache when it is approaching the max
  250. size set by the user.</li>
  251. </ul>
  252. <ul>
  253. <li>The &quot;cache-control: no-cache&quot; HTTP header is now
  254. supported. &quot;no-cache&quot; means cached contents cannot be
  255. used without re-validation. When the no-cache directive is used ,
  256. an update check is always made to make sure the cached content is
  257. the same as the server copy pointed to, by the resource URL. If so,
  258. cached copy can be used. If not, server copy will be downloaded.
  259. Expiration field is ignored, which means that even if the cached
  260. resource is not expired yet, update check will still be
  261. performed.</li>
  262. </ul>
  263. <ul>
  264. <li>The expiration-date will be honored.&nbsp; If a downloaded
  265. resource contains an expiration date, it will not be used after
  266. that date.</li>
  267. </ul>
  268. <p style="margin-left: 0.42in">Note: The format of the cache is
  269. completely changed and should never be assumed.&nbsp; Any existing
  270. code that assumed the previous format of the cache, for either Java
  271. Web Start or Java Plug-in will no longer work.&nbsp; Existing
  272. applications in the Java Web Start cache will be upgraded and
  273. converted to the new cache format the first time you run a Java Web
  274. Start application, or if you launch the cache viewer using
  275. &quot;javaws -viewer&quot;. Likewise, the system cache will be
  276. upgraded and converted to the new format the first time you launch
  277. Java Web Start in system mode, or if you just launch &quot;javaws
  278. -system&quot;.</p>
  279. <ul>
  280. <li>
  281. <p>The Java Console is now excluded from modality.</p>
  282. </li>
  283. </ul>
  284. <p style="margin-left: 0.42in">By using the new modality features
  285. added by AWT in Java 6, you can interact with the Java Console even
  286. when the Application displays a modal Dialog.</p>
  287. <ul>
  288. <li>
  289. <p>New support for OCSP/CRL</p>
  290. </li>
  291. </ul>
  292. <p style="margin-left: 0.42in">Java Web Start and Java Java Plug-in
  293. support CRL (Certificate Revocation Lists) and OCSP (Online
  294. Certificate Status Protocol) for verifying the certificates.</p>
  295. <ul>
  296. <li>
  297. <p>New Support for SSL/TSL</p>
  298. </li>
  299. </ul>
  300. <p style="margin-left: 0.42in">An Option has been added to the Java
  301. Control Panel to select the default SSL handshaking protocol.<br />
  302. The default is set to SSLv3 and SSLv2, but then user or enterprise
  303. can change it to TSL.<br />
  304. <br />
  305. <br />
  306. <br /></p>
  307. <p style="margin-bottom: 0in"><br /></p>
  308. <p style="margin-left: 0.42in; margin-bottom: 0in"><br /></p>
  309. <!-- footer start -->
  310. <div id="javasefooter">
  311. <div class="hr">
  312. <hr /></div>
  313. <div id="javasecopyright">
  314. <img id="oraclelogofooter" src=
  315. "../../../images/oraclelogo.gif" alt="Oracle and/or its affiliates"
  316. border="0" width="100" height="29" name=
  317. "oraclelogofooter" />
  318. <a href="../../../legal/cpyr.html">Copyright
  319. &#169;</a> 1993, 2014, Oracle and/or its affiliates. All rights
  320. reserved.</div>
  321. <div id="javasecontactus">
  322. <a href=
  323. "http://docs.oracle.com/javase/feedback.html">Contact
  324. Us</a>
  325. </div>
  326. </div>
  327. <!-- footer end -->
  328. <!-- STATIC FOOTER -->
  329. </body>
  330. </html>