1

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

4
  • 4
    google.com/search?q=what+is+a+jar+file Commented Apr 8, 2010 at 23:47
  • Googlelable questions are perfectly valid if you look at the FAQ. Commented Apr 8, 2010 at 23:50
  • @HeavyWave: No one is saying that this question isn't valid. Commented Apr 8, 2010 at 23:52
  • 2
    If you don't know what one is, how do you know that you want to create one? Commented Apr 9, 2010 at 0:04

1 Answer 1

5

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 
Sign up to request clarification or add additional context in comments.

2 Comments

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?
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 java.sun.com/docs/books/tutorial/deployment/jar/build.html

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.