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
Define the key weakness of the web? the key weakness of the web is Initially web was designed only for humans to read not for computers to understand it.

RMI parameters : Primitive types are given by value. 2. References to remote objects are given as remote references that allow the client process to call methods on the rem

This work assesses the following Outcomes: • Build robust, secure distributed systems using advanced programming techniques Use RMI to build a distributed application accessing

Are you real? I dont want to get help from a computer

BeanFactory has many executions in Spring. But one of the most useful one is org.springframework.beans.factory.xml.XmlBeanFactory, which loads its beans based on the definitions ha

Illustrate the method to print on the GUI Example Code: Taking Input / Output So far, we learned how to print something on console. Now time has come to learn how to print

What can you do with an exception once you've caught it? 1. Fix the difficulty and try again. 2. Do anything else instead. 3. Exit the application along with System.exit() 4

A   socket   is      interaction   channel,   which   facilitates   inter-process   communication. A socket is an endpoint for interaction. There are two types of sockets, dependin

Write a ComputePart class and a ComputerKit class(and a cliet class to test them) You should include the following methods: a method returning "expensive" if the total of the price

Write a program called LandThePlane that calculates whether a plane successfully lands or not.   The program begins by prompting (asking) the user for the following details, in th