• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is JAR?

 
Frederick Winsnes
Greenhorn
Posts: 17
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
This might be a stupid question, but what is a JAR-file and what does it do?
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12098
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
bill steve
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i use IZArc to unzip them so i can see what class are in them. really helps......
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Death Arte
Greenhorn
Posts: 21
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it also used to easily execute the program that you compiled. "Executable JAR"
 
Luigi Plinge
Ranch Hand
Posts: 441
IntelliJ IDE Scala Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Saloon Keeper
Posts: 15216
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Luigi Plinge wrote:You should search first. . . .
And try searching here under the "deployment" heading.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic