410 Object-Based Programming (Web site construction) Chapter 8 ual file.] It

410 Object-Based Programming Chapter 8 ual file.] It is important that the directory structure in the JAR file match the directory structure for the packaged classes. Therefore, we executed the jarcommand from the directory in which com is located. To confirm that the files were archived directly, you can issue the command jar tvf TimeTest5.jar which produces the listing in Fig. 8.10. In the preceding command, the options for the jar utility are tvf. The letter t indicates that the table of contents for the JAR should be listed. The letter v indicates that the output should be verbose (the verbose output includes the file size in bytes and the date and time each file was created, in addition to the directory structure and file name). The letter f specifies that the next argument on the command line is the JAR file to use. The only remaining issue is to specify the archive as part of the applet s HTML file. In prior examples, tags had the form To specify that the applet classes are located in a JAR file, use an tag of the form: The archive attribute can specify a comma-separated list of archive files for use in an applet. Each file in the archivelist will be downloaded by the browser when it encounters the tags in the HTML document. For the TimeTest5 applet, the applet tag would be Try loading this applet into your Web browser. Remember that you must either have a browser that supports Java 2 (such as Netscape Navigator 6) or convert the HTML file for use with the Java Plug-in (as discussed in Chapter 3). 0 Fri May 25 14:13:14 EDT 2001 META-INF/ 71 Fri May 25 14:13:14 EDT 2001 META-INF/MANIFEST.MF 2959 Fri May 25 13:42:32 EDT 2001 TimeTest5.class 0 Fri May 18 17:35:18 EDT 2001 com/deitel/ 0 Fri May 18 17:35:18 EDT 2001 com/deitel/jhtp4/ 0 Fri May 18 17:35:18 EDT 2001 com/deitel/jhtp4/ch08/ 1765 Fri May 18 17:35:18 EDT 2001 com/deitel/jhtp4/ch08/Time3.class Fig. 8.10 Contents of TimeTest5.jar. Copyright 1992 2002 by Deitel & Associates, Inc. All Rights Reserved. 7/3/01
Note: If you are looking for high quality webhost to host and run your jsp application check Vision christian web host services

Leave a Reply