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
how android applications are made using java.?

Authentication is basically an identification step. Functionality used for J2EE security: Principal : An entity that may be authenticated and identified. Principal n

Pick your favorite geometry formula (e.g., area of a square, perimeter of a triangle …) and implement it in Java. Demonstrate your code compiles and runs without issue (You can use

What is required to be done from my programming is : I enter name,day(saturady or sunday),time( 10AM and 10PM) My program must then vaildate name,day and time. Name must only a

Can a class implementing a Remote interface have non remote processes? Ans) Yes. Those processes behave as normal java process operating within the JVM.

What is Resuscitation Trolley explain their features? A proper resuscitation kit is mandatory for the ICU. In addition to trolleys that can be moved around the ICU there should

JAVA, JSF(primefaces), SPRING Application Support Project Description: We require some one to be part of our team's new development , it's small application but in future, ch

I just finished a small tutorial on JSP and servlet now I was looking for some assignments so that I can try my hands on

iam trying to build an application that store information like name mobile age in a file its like a registration form everytime i enter a new person data i want the applicaion mak

Differentiation between an Applet and an Application ?