To create an executable .jar:
jar -cvfe <output_name> <entry point> <class file>
e.g.
jar -cvfe output.jar HelloWorld *.class
-c
create new archive-v
generate verbose output on standard output-f
specify archive file name-e
specify application entry point for stand-alone application bundled into an executable jar fileRef:
How to create and execute JAR file in Java – Command line Eclipse Netbeans
No comments:
Post a Comment