posted 15 years ago
//if not any executable jar i.e does not have any manifest
jar -cfM jarfilename.jar yourclassfilename.class
//if an executable jar i.e. has a manifest file too
-jar -cfm jarfilename.jar manifestfilename.mft yourclassfilename.class