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
Explain the uses of JVM verifier The JVM "verifier" checks the code when it's loaded to verify that it has the correct structure --that it does not use an uninitialized pointer

Explain Choosing Font Faces and Sizes in java AWT packages? Choosing a font face is simple. First you create a new Font object. Then you call g.setFont(Font f). To instantiate

State in detail about Java Virtual Machine (JVM) Central part of java platform is java virtual machine Java bytecode executes by special software known as a "virtual machine

Write a program on Filling Rectangles ? The drawRect() method draws an open rectangle, a box if you prefer. If you need to draw a filled rectangle, use the fillRect() method. O

Use a FOR loop and give me the largest number divisible by 7 11 13 17 use the number from 1 to 10000 (or even 100000)

i''m trying to make a code to make the simon says game and i can''t figure it outt

Differentiate uni-Processor OS from Multi-Processor OS? Uni-processor OS : Uni-processor OS'es is designed to schedule tasks on a single uPs just whereas Multiprocessor O

Define : Authorization is the process by which a program calculates whether a given identity is permitted to access a source such as an application component or a file. Now that y


Problem 1 Explain and Define the following concepts with appropriate examples a) Superclass b) Subclass c) Inheritance d) Exceptions e) Stream classes >>Defining and expl