Explain jar archives, JAVA Programming

Assignment Help:

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.


Related Discussions:- Explain jar archives

Describe java operators, Describe java operators? An operator is a symb...

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,

Basic difference between java and c++, Both Java and C++ use same syntax an...

Both Java and C++ use same syntax and are Object Oriented, but there are several differences between Java and C++:   1.    Java does not use pointers. Pointers are inherently

Constructors or destructors in java program, Consider the following Java de...

Consider the following Java definition of an integer list class. class IntegerList { private int[] list = new int[200]; private int size = 0; public boolean append(int value) {

Write a short Java application that stores words in an Array, Write a short...

Write a short Java application that stores words in an Array or ArrayList. You get to pick the number of words to store. Generate a random number between 0 (inclusive) and the leng

Prepare a java program, Using Java, write the class Time which consists of ...

Using Java, write the class Time which consists of the following: (a) three private integer data members (hours, minutes and seconds). (b) a constructor to initialise the dat

SMALLTALK PROGRAMING, YOUR EXPERT CAN DEAL WITH SMALLTAK PROGRAMMING AND BP...

YOUR EXPERT CAN DEAL WITH SMALLTAK PROGRAMMING AND BPMN AND DoME BECAUSE I HAVE PROJECT RELATED WITH THIS PROGRAMING

How much cpu time does an applet get, How much CPU time does an applet get?...

How much CPU time does an applet get? One of the few legitimate concerns about hostile applets is excessive use of CPU time. It is possible on a non-preemptively multitasking s

What system.out.println() signifies, What 'System.out.println()' signifies?...

What 'System.out.println()' signifies? 'System' is a predefined class. System class gives access to the system. 'out' is the output stream. 'println' is printin

Jzebra integration into open erp web client, JZEBRA Integration into (Open ...

JZEBRA Integration into (Open ERP) Web Client Local Spooling/Printing to Local Print Device on ERP Client side Project Description: JZEBRA Integration into Open ERP Web Clien

String, in java string is a

in java string is a

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd