You can run a JAR file if a main class is specified in the manifest.
You must also specify the classpath in the manifest. The JAR file's classpath consists of the relative paths to any other JAR files that contain classes that your JAR file needs. When running a JAR file, the classpath in the IDE and command line is ignored.
An example of a runnable JAR file's manifest is:
Manifest-Version: 1.0 Main-Class: teststuff.Arch Class-Path: arch.jar ../archiver/archiver.jar ../netbeans/lib/ext/jaxp.jar ../fjce/lib/ext/xerces.jar
To run a JAR file: