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
Determine the types of object oriented programme Classes - Prototypes for objects - Definition or a blueprint of a user-defined datatype - Think of it as a ma

Write a function that draws a cow at a certain location on the screen, and use the function to draw a herd of cows

WAP to input a 4 digit no and find greatest using nested if

What is Documentation for the class library Sun gives a large amount of documentation for the classes, interface's and exceptions in the class library. If you've installed the

What is JavaServer Faces event and listener model? Ans) A mechanism for verifying how events emitted by JavaServer Faces UI components are handled. This model is based on the Ja

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Explain java.util.Random package? The java.util.Random class permits you to create objects which generates pseudo-random numbers along with uniform or gaussian distributions ac

Modify your UserProfile class to meet the following requirements: It must include a field called wall to store an ArrayList of wall posting objects. It must also provide


I want Software Tool for Sequential Circuit Analysis The output of the program could be both graphical for the diagram and the rest is console. Skills required: C++ Progra