tags:

views:

37

answers:

1

What exactly is a .jar file and how do i create one?

+2  A: 

According to wikipedia, JAR is an archive format used by Java to combine classes into one application or library.

It is essentially a zip archive with some additional information, such as a manifest.

To create one just use jar command inside the folder where you store your classes.

jar -cf my.jar *.class
HeavyWave
i don't understand what you mean when you say to use those commands inside that folder. do i do this from the command line or do i make a program in the folder that does this or soemthing else? what do i do?
David
jar is a command line tool, part of the Java, the same as java and javac commands. There is a tutorial at sun's website http://java.sun.com/docs/books/tutorial/deployment/jar/build.html
HeavyWave