Instantly, tried runnable JAR file instead of "JAR File" in export settings and it worked out for me.
Other JAR commands:
1. To view the contents of a JAR File:
jar tf jar-file
Let's look at the options and argument used in this command:
- The t option indicates that you want to view the table of contents of the JAR file.
- The f option indicates that the JAR file whose contents are to be viewed is specified on the command line.
- The jar-file argument is the path and name of the JAR file whose contents you want to view.
The t and f options can appear in either order, but there must not be any space between them.
This command will display the JAR file's table of contents to stdout.
You can optionally add the verbose option, v, to produce additional information about file sizes and last-modified dates in the output.
2. To extract content of JAR File:
jar xf jar-file [archived-file(s)]
Let's look at the options and arguments in this command:
- The x option indicates that you want to extract files from the JAR archive.
- The f options indicates that the JAR file from which files are to be extracted is specified on the command line, rather than through stdin.
- The jar-file argument is the filename (or path and filename) of the JAR file from which to extract files.
- archived-file(s) is an optional argument consisting of a space-separated list of the files to be extracted from the archive. If this argument is not present, the Jar tool will extract all the files in the archive.
3. To create a JAR File
The basic format of the command for creating a JAR file is:
jar cf jar-file input-file(s)
The options and arguments used in this command are:
- The c option indicates that you want to create a JAR file.
- The f option indicates that you want the output to go to a file rather than to stdout.
- jar-file is the name that you want the resulting JAR file to have. You can use any filename for a JAR file. By convention, JAR filenames are given a .jar extension, though this is not required.
- The input-file(s) argument is a space-separated list of one or more files that you want to include in your JAR file. The input-file(s) argument can contain the wildcard * symbol. If any of the "input-files" are directories, the contents of those directories are added to the JAR archive recursively.
The c and f options can appear in either order, but there must not be any space between them.
This command will generate a compressed JAR file and place it in the current directory. The command will also generate a default manifest file for the JAR archive.
No comments:
Post a Comment