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
Writing a report

How Polylines draws in java language? Java automatically closes the polygons it draws. That is it draws polygons which look like the one on the right rather than the one on the

RMI transport layer usually opens direct sockets to the server. Several Intranets have firewalls that do not accept this. To get through the firewall an RMI call may be embedded wi

Write a JSP to display a table that contains factorials for the numbers from 0 to 10,

In Exercise 1 you were asked to modify the Sorts program so that it would output the number of swaps used by a sorting method. It is a little more difficult to have the program als

What is the name of the services you have chosen? What do they do? What is the name of the publisher? Provide details if you are developing your own service(s). There are variou

n this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, such

Diffentiate Local and Global Variables? Local or function level variable effective just in the function in that they are declared although global variables visible everywhere o

Prepare Simple spring maven task Project Description: We want a very simple delivery for one of our tasks using Spring STS Maven project. This chat does not have UI interf

I want a Script developer who will make script for me and if you can show good works there are bonuses too. Skills required are Facebook Marketing, Java, Javascript, PHP, and Sc