|
-
Dec 2nd, 2001, 01:37 PM
#1
Thread Starter
Hyperactive Member
what is a JAR file?
what is a JAR file? I know it stands for Java ARchive <i think > but does [B]THAT[\B] mean and what is its purpose
"There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein
If you are programming in Java use www.NetBeans.org
-
Dec 2nd, 2001, 04:29 PM
#2
Dazed Member
Im not too sure so don't quote me on this. A JAR file is basically used to group your classes togther for furture deployment. I don't think that there is any automatic installation involved like there is using Visual Basics Package and Deployment wizard. Most people zip up(compress) their JAR files for subsequent extraction. I haven't really coded anything yet that i would want to deploy. Most of my projects are unfinished.
-
Dec 2nd, 2001, 04:32 PM
#3
Thread Starter
Hyperactive Member
Originally posted by Dilenger4
Most of my projects are unfinished. [/B]
Ain't that the truth eh!
Is there anyway to unJAR a JAR?
"There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein
If you are programming in Java use www.NetBeans.org
-
Dec 2nd, 2001, 04:38 PM
#4
Dazed Member
You guess is as good as mine.
-
Dec 2nd, 2001, 04:58 PM
#5
Lively Member
Can you unJAR a JAR
JAR = Java Archive File where all files are compressed ready for deployment.
I think you can work on them if you have something like JBuilder Enterprise or Pro
Amazing my first reply on a subject i thought i knew nothing about
-
Dec 2nd, 2001, 05:00 PM
#6
Dazed Member
But is the compression automatic? Or do we have to manually do it with win zip of another compresion utillity? Thanks.
-
Dec 2nd, 2001, 07:30 PM
#7
Addicted Member
jar files are neat. They save space and make your finished project easy to deploy. Ideally, when you distribute your product it will consist entirely of jar files. All of the files that you yourself created will generally reside in one jar file, while all of the other packages written by others will reside in their respective jar files.
Jar files are easy to manipulate. The syntax is very similar to unix tar (tape archive).
On the command line to create a jar file, you'd say:
jar -cvf myjar.jar *.class
c, v and f are independent options.
c means create the archive
v means verify (show me) each argument that is going into it
f means the archive filename will appear next.
There is also a manifest file option. I'm not sure what it is exactly, but we don't use it. I think it's a file that tells about all the classes in the archive, but I'm not exactly sure why.
jar files are compatible with the zip format so you can unzip a jar. I wouldn't suggest making a jar with zip just to be on the safe side.
Another thing--if you want to see all the classes that are in your jar or somebody else's jar try:
jar -tf other.jar
You can even extract all the classes by typing
jar -xvf other.jar
Because java classes are wonderfully small to begin with, we don't bother with compressing our jars. From our perspective, a compressed jar is less desirable because of the decreased speed of decompressing it.
Marlin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|