Explain jar archives, JAVA Programming

Explain JAR Archives ?

HTTP 1.0 uses a separate connection for every request. When you're downloading several small files, the time required to set up and tear down the connections can be a significant fraction of the total amount of time needed to load a page. It would be better if you could load all the HTML documents, images, applets, and sounds a page required in one connection.

One way to do this without changing the HTTP protocol is to pack all those various files into a single archive file, perhaps a zip archive, and just download that.

We aren't quite there yet. Browsers do not yet understand archive files, other than applets do. You can pack all the images, sounds, and .class files an applet needs into one JAR archive and load which instead of the individual files. Applet classes do not have to be loaded directly. They can also be stored in JAR archives. To do this you use the ARCHIVES attribute of the APPLET tag
< applet code="HelloWorldApplet"
width="200" height="100"
archives="HelloWorld.jar">
< hr>
Hello World!
< hr>
< /applet>

In this example, the applet class is still HelloWorldApplet. Therefore, there is no HelloWorldApplet.class file to be downloaded. Instead the class is stored inside the archive file HelloWorld.jar.
Sun provides a tool for creating JAR archives with its JDK. For example,
$ jar cf HelloWorld.jar *.class

This puts all the .class files in the current directory in the file named "HelloWorld.jar". The syntax of the jar command is deliberately same to the Unix tar command.

Posted Date: 5/16/2013 6:05:00 AM | Location : United States







Related Discussions:- Explain jar archives, Assignment Help, Ask Question on Explain jar archives, Get Answer, Expert's Help, Explain jar archives Discussions

Write discussion on Explain jar archives
Your posts are moderated
Related Questions
Decode the Code Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new techn

Using RMI, program a PONG game that enables two users to play against one another. Pong class: package graphics;/* * Copyright (c) 2006, Your Corporation. All Rights Reserved. */

Problem : Compiler Design - Limit the loops Rajni is a newbie to the programming and while learning the programming language he came to know the following rules: ???• Each program

I need Java coding Need to develop a website. Require Java coder's urgently. Skills required: HTML, Graphic Design, Java, PHP, Website Design

Explain Identifiers in Java ? Identifiers are the names of variables, classes, methods, packages and interfaces. Unlike literals they are not the things themselves, only ways o

For this assignment, you will simulate a file system. You will be neither creating files nor reading or writing disk files. Rather, you will have a simulation of a file system that

A preconfigured JMS object (a resource manager connection factory or a destination) formed by an administrator for the use of JMS clients and placed in a JNDI namespace

Write a short note on image preloading process? The primary use of image preloading procedure is to download the image within the cache before it is actually required to displa

JMX framework can enhance the manageability of your application by  1. Monitoring your application for critical events, performance problems, and error condition statistics. E.g

Give an example of code using static and finalize Example Code: using static & finalize () We want to count exact number of objects in memory of a Student class the one de