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
What is Alternate Text ? The APPLET element can have an ALT attribute. An ALT attribute is used through a browser which understands the APPLET tag but for some purpose cannot

Im not in the line of computer science.But i would like to have some knowledge about the computer language "JAVA".I aldredy learns the computer languages "C,C++".So kindly help me

Task 1 Create a new project in Eclipse called Assignment 1. Within this project create a package called task01. 1/ Download the class Date (you must use this class - no

What will be the default values of all the elements of an array explained as an instance variable? If the array is an array of primitive types, then all the elements of the arr

Explain Testing for Equality with equals? That's not what you expected. To contrast strings or any other kind of object you required to use the equals(Object o) techniques from

What is an intelligent system? Intelligent system is a SW programs or SW and HW systems designed to perform complex tasks employing strategies in which mimic some aspect of hum

What are Checked and UnChecked Exception? A checked exception is some subclass of Exception (or Exception itself), excluding class RuntimeException and its subclasses. Making a

1. Inception : In the mean while the inception phase, you work out the business part for the project. You also will be creating a rough cost estimate and return on investment.

Website for swapping/selling books Project Description: Seeking a website where students can sell and buy books. I want them to swap books as well. Payment options are requir

What is meant by semantic error? Occur although a statement executes and has an effect not intended by the programmer and Frequently times occur just in unusual & infrequent ci