Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: James Rivera   on Jul 31 In Java Category.

  
Question Answered By: Jeanette Greene   on Jul 31

JAR means Java ARchive, it used to pack all your compiled .class files,
image files, etc., just before distributing your application.Because you packed
all in one file than it is easy to manage the entire application. One more
advantage of JAR file is that it is in a compressed form so you can save the
disk space & reduce the network traffic because of the reduced file size. (But
if you use compress method while creating a JAR, it takes a bit time to extract
the JAR while start-up of ur app so it takes some more start-up time of ur app..
(if I am wrong plz let me know)) so if you are using an applet based / swing
based or any other java programs you can make as a single JAR file after
compiling & distribute.

Note: You can directly execute a JAR file by command line or by just double
clicking in the latest releases (j2sdk1.4) because while installing java itself
it registers JAR extension I believe. for that you have set a manifest file
about the main-class,author,. etc.,

for more info about JAR, plz see the sun's site
java.sun.com/.../

I don't think there is any relationship between JAR file & OBJ file.. if any
plz clarify me..

.EXE form is basically for only Windows/DOS platform, you can't directly
execute .EXE files in other platforms like Linux,Unix,Solaris. But Java Classes
are platform independent by nature you can execute the .class files anywhere
there is an JVM(Java Virtual Machine). That means you can compile a class file
in windows & still u can use the same class file in Linux / Solaris. this method
is called Write Once, Run Anywhere (WORA) But still their is some tools like
J2EXE are there in Net, you can search & find it, that will make .class files
into .exe form I belief.

I agree.Class are executing little bit slower compared to OS dependant .EXE
files because it's very close to Operating System.

Share: 

 

This Question has 28 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Why we declare the constructor private? Or get search suggestion and latest updates.


Tagged: