What is jar archives, JAVA Programming

Assignment Help:

What is JAR archives?

JAR archives are ZIP archives along with a different extension. They contain a hierarchy of files and directories. In spirit a JAR file can take the place of a directory containing its contents. This has several uses involving the distribution of associated classes as a single file.

The JDK involve a jar program modeled after the Unix tar program in which will bundle up files and directories into a JAR archive. For instance, suppose your homework directory contains the file Trivia.class.

Now suppose in which Trivia is in the package edu.poly.utopia.eharold.games. Also suppose that the directory /home/users/eharold/homework/ contains (in various sub-directories) all the files and directories essential to run the program edu.poly.utopia.eharold.games.Trivia. You can pack up everyhting in the edu package into a JAR archive like this:

$ cd /home/users/eharold/homework
$ jar cvf eharold.jar edu
The edu directory and all its contents are recursively stored in the archive named eharold.jar. The name of the archive is not important, only its contents.

This archive might now be added to the class path like this, or in whatever fashion you normally add directories to the class path on your platform of choice:

$ setenv CLASSPATH $CLASSPATH:eharold.jar

The major thing to note here is in which the JAR file is now taking the place of an whole directory hierarchy.
In Java 1.2 you can also place it within the ext directory of your jre/lib directory.

Either way, all the classes in the archive will be added to the class path and will be easy to get to to your programs.


Related Discussions:- What is jar archives

Developing a prototype system in php and javascript, General Overview A...

General Overview A number of organisations are using micro-blogging as a cost-effective way of communicating with customers, building online communities and releasing informati

BLP java program, could you please help me with my assignment. My program ...

could you please help me with my assignment. My program need to implement a multi{level role based database script SQL-like generation program. Or part of one anyway. Start with a

Android app for evaluating of distance, Android app for evaluating of dista...

Android app for evaluating of distance Project Description: The request is to prepare an app for Android. The application needs to run on tablet (7 "or larger) and the layout

Implement queues - linked list, Implement Queues / Linked List Project D...

Implement Queues / Linked List Project Description: In this project, two kinds of queue are implemented: LinkedQueue implements FIFOQueueInterface { .... } and LLQueueItr imp

Prob, hi there I have some problem on java .. can u do it for me

hi there I have some problem on java .. can u do it for me

Pogram must work on all realms and all ladders, Project Description: The...

Project Description: The program must work on all realms, all ladders, all cores (4x realms,2x ladders,2x cores) The program must be unpatchable and undetectable If patche

Program, Write a program called Power that displays the positive powers of ...

Write a program called Power that displays the positive powers of 2. When the user enters the exponent at a prompt, the program displays 2 to that power. The program halts when the

What is event handler works, What is Event Handler works? An event hand...

What is Event Handler works? An event handler is a command which is used to call a function when an event happens, such as the user clicking a button or mouse.

What is the function of network interface card, What is the function of Net...

What is the function of Network Interface Card? NIC is an I/O device which plugs within the computer and it enables it to communicate over a network.

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