| Author |
What is JAR?
|
Frederick Winsnes
Greenhorn
Joined: Feb 22, 2011
Posts: 17
|
|
Hi
This might be a stupid question, but what is a JAR-file and what does it do?
|
 |
fred rosenberger
lowercase baba
Bartender
Joined: Oct 02, 2003
Posts: 9956
|
|
|
it's a Java ARchive. Basically, you can think of it as a zip file of your compiled .class files (and other resources like .jpg or whatever). They are used for distributing your application.
|
Never ascribe to malice that which can be adequately explained by stupidity.
|
 |
bill steve
Greenhorn
Joined: Feb 22, 2011
Posts: 7
|
|
|
i use IZArc to unzip them so i can see what class are in them. really helps......
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56229
|
|
Any application that can handle zip files can handle jar files -- they're just zip files with a .jar file type.
If you've got a Java JDK installed, the jar command line command can be used.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Death Arte
Greenhorn
Joined: Feb 17, 2011
Posts: 21
|
|
|
it also used to easily execute the program that you compiled. "Executable JAR"
|
 |
Luigi Plinge
Ranch Hand
Joined: Jan 06, 2011
Posts: 441
|
|
You should search first. You can type "jar file" into Wikipedia (or Google, which gives the Wikipedia page as its top answer) and get a comprehensive answer without asking other people to type out an answer for you.
I think Wikipedia is one of the default search engines on Firefox, so it's literally about 3 clicks away.
|
 |
Frederick Winsnes
Greenhorn
Joined: Feb 22, 2011
Posts: 17
|
|
Luigi Plinge wrote:You should search first. You can type "jar file" into Wikipedia (or Google, which gives the Wikipedia page as its top answer) and get a comprehensive answer without asking other people to type out an answer for you.
I think Wikipedia is one of the default search engines on Firefox, so it's literally about 3 clicks away.
Your'e right. I was to quick to post, but a bit late to do anything about that. Will search in the future tho.
Thanks for the answers everyone!
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12929
|
|
bill steve wrote:i use IZArc to unzip them so i can see what class are in them. really helps......
You can open JAR files with tools that handle ZIP files. But the standard program that's included with the JDK to work with JAR files is the jar tool. It doesn't have a GUI, it works on the command line only.
And here you can find the official documentation about JAR files: JAR File Overview.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32712
|
|
And try searching here under the "deployment" heading.
|
 |
 |
|
|
subject: What is JAR?
|
|
|