Jar Creator

A GUI for JAR

Instructions

Jar Creator is a graphical user interface that helps you create java archive (JAR) files. You don't have to look up the syntax for the jar command and you don't have to use the system console. Jar Creator's user interface can also be handy if you want to verify the structure of the JAR you are about to create. This applet above can roll your files into a JAR and set a main class quickly, easily, and without any extra work.

Jar Creator uses the maximum possisble zip compression. It also doesn't add any extra files or manifest entries. This means that the JARs you create here will be small -- ideal for deployment on the web or emailing to an instructor.

Adding Files

There are three ways to add files to the JAR:

When you add directories to the JAR, they will retain the directory structure. This is represented by the entry names in the Jar Files list.

Adding files to the Jar Files list will not effect your hard drive in any way.

Removing Files

There are two ways to remove files from the JAR once they have been added:

Removing files from the Jar Files list will not effect your hard drive in any way.

Setting the Main Class

To set the main class (or entry point) in your jar:

  1. In the Jar Files list, right-click the class file
  2. In the menu that pops up, click Set as Main Class

This option is only available for files ending with a .class extension.

Create the JAR File

When you want to roll the contents of the Jar Files list into a JAR, click Create Jar.... This will launch a file chooser that lets you pick where to save the JAR. When you click Save the JAR is created and you are finished.

If your Java application is graphical and you set a main class, you can now double-click on the JAR and your program should run.

Troubleshooting

It doesn't do anything!
You must not trust me. If you answered Cancel or No to the security question when the page loaded, you denied the applet the ability to read and write to your hard drive and drag buffer. Those are pretty much the only things JAR Creator does. You'll need to close your browser and come back to the page.