Quote:
Originally posted by aaronkupen How do i make a .Jar file |
jar cmf main-class jar-file input-file(s)
the c indicates you want to create the file, the f indicates you want to create a file rather than write to std out. the m requires you to specify a main class and is required if you want to make it executable
Jar files are not pretty much the same as .exe's jar files are more like .zip files, although it is possible to make them executable using a command similar to above
you would then run something like:
$ java -jar jar-file-name
you can also add any command line arguments at the end if required.
if using windows create a .bat file that runs this command, if using linux just create a script with the commands in it