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 are Checked and UnChecked Exception? A checked exception is some subclass of Exception (or Exception itself), excluding class RuntimeException and its subclasses. Making a

Describe java operators? An operator is a symbol which operates on one or more arguments to generate a result. The Hello World program is so easy it doesn't use any operators,

What is 'public static void main (String args[ ] ) ' signifies? Access specifier is the 'public' keyword. 'static' keyword allows main() to called without instantiating


Search on column demonstration in Semantic Vector Project Description: I am preparing a research on Semantic Vectors. But I am not able to check out in a vector representa

Padovan String

State the Java Programmer Efficiency Faster Development Building an application in Java takes about 50% less time than in C or C++. So, faster time to market Java is said to

Write the JavaScript code for the Function SumOddNumbers(maxNumber) in which can add non-negative odd numbers up to maxNumber and return their sum. Java Script Code

Write a ComputerPart class and a ComputerKit class and a client class to test them. The ComputerPart class has two variables: a String representing an item, and a double representi

List the unexpected quotients in java? 2/3 = 0 3/2 = 1 1/0 = ArithmeticException 0/0 = ArithmeticException 1.0/0.0 = Inf 1.0/0 = Inf 0.0/0.0 = NaN -1.0/0.0