Java Reference
In-Depth Information
Generally speaking, don't use the Classloader.loadSystemResources() or related
methods to retrieve icons or other items from application JAR files. JNLP Clients use
their own classloader implementations, so ask the current (JNLP-launched) class or the
main thread for its classloader, and use that one instead.
Remember that developers don't have to worry about where JAR files are located in the local
file system because the JNLP Client took care of downloading them, installing them in its
cache, and making them available in the application environment.
In Chapter 10, the resource issue (accessing items into JAR files, and so on) is fully
detailed, with ready-to-use utility Java classes.
Finally, the application home page, in which users can refer to when needed, is shown in
Listing 8.6.
L ISTING 8.6 The Home Page of the editor1 Application
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1”>
<title>Chapter 8. A Simple text Editor</title>
<body bgcolor=”#FFFFFF”>
<h1>Text Editor #1 !</h1>
<p>A Simple Text Editor</p>
This is the Home page of the simple text editor.
<li><a href=”c8/editor1/editor1.jnlp”>A Simple text Editor</a></li>
Search WWH ::

Custom Search