Jar To Exe

jar

  1. Jar To Exe File
  2. Jar To Exe Key
  3. Jar To Exe
  4. Jar To Exe Online
  5. Jar To Exe Online

Downloading Jar2Exe means you have accepted the License Agreement. The current version is V2.5.4, the main new feature is to increase the complex of encryption and upgrade the Java support to Java 5 Java 14.

combines multiple files into a single JAR archive file.

SYNOPSIS

Create jar file
jar c[v0M]fjarfile[-Cdir]inputfiles[-Joption]
jar c[v0]mfmanifestjarfile[-Cdir]inputfiles[-Joption] [-e entrypoint]
jar c[v0M] [-Cdir]inputfiles[-Joption]
jar c[v0]mmanifest[-Cdir]inputfiles[-Joption]
Update jar file
jar u[v0M]fjarfile[-Cdir]inputfiles[-Joption]
jar u[v0]mfmanifestjarfile[-Cdir]inputfiles[-Joption] [-e entrypoint]
jar u[v0M] [-Cdir]inputfiles[-Joption]
jar u[v0]mmanifest[-Cdir]inputfiles[-Joption]
Extract jar file
jar x[v]fjarfile[inputfiles] [-Joption]
jar x[v] [inputfiles] [-Joption]
List table of contents of jar file
jar t[v]fjarfile[inputfiles] [-Joption]
jar t[v] [inputfiles] [-Joption]
Add index to jar file
jar ijarfile[-Joption]

where:

  1. JarToExe 1.8 Jar2Exe is a tool to convert jar files into exe files. Following are the main features as describe on their website: Can generate “Console”, “Windows GUI”, “Windows Service” three types of.exe files. Generated.exe files can add program icons and version information.
  2. May 27, 2020 When you compile application at that time java compiler converts your java file to jar file. But this jar file will not run on a machine which doesn’t have a java compiler (JRE) installed. That’s why it’s important to convert jar to exe file and exe file can run on any windows machine.
  3. The installer will generate a.exe file from.jar and will bundle the JRE with the app. Now, you will need to run the file through a batch file. For that, create a new folder. Put the.exe JAR and the JRE folder in that folder. Next, you will have to create a batch file in the same folder.
  4. A JAR (Java ARchive) is a way of packaging together all of the resources associated with a program (class files, images, sounds, etc.). Putting your program in a JAR allows it to be distributed as a single executable file, saving space and simplifying the download process.
cuxtiv0Mmf
Options that control the jar command.
jarfile
File name of the Jar file to be created (c), updated (u), extracted (x), or have its table of contents viewed (t). The -f option and filename jarfile are a pair -- if either is present, they must both appear. Note that omitting -f and jarfile accepts jar file from standard input (for x and t) or sends jar file to standard output (for c and u).
inputfiles
Files or directories separated by spaces, to be combined into jarfile (for c and u), or to be extracted (for x) or listed (for t) from jarfile. All directories are processed recursively. The files are compressed unless option -0 (zero) is used.
manifest
Pre-existing manifest file whose name : value pairs are to be included in MANIFEST.MF in the jar file. The -m option and filename manifest are a pair -- if either is present, they must both appear. The letters m and f must appear in the same order that manifest and jarfile appear.
entrypoint
The name of the class that set as the application entry point for stand-alone applications bundled into executable jar file. The -e option and entrypoint are a pair -- if either is present, they must both appear. The letters m, f and e must appear in the same order that manifest, jarfile, entrypoint appear.
-C dir
Temporarily changes directories to dir while processing the following inputfiles argument. Multiple -C dirinputfiles sets are allowed.
-Joption
Option passed into the Java runtime environment. (There must be no space between -J and option).

DESCRIPTION

The jar tool combines multiple files into a single JAR archive file. jar is a general-purpose archiving and compression tool, based on ZIP and the ZLIB compression format. However, jar was designed mainly to facilitate the packaging of java applets or applications into a single archive. When the components of an applet or application (.class files, images and sounds) are combined into a single archive, they may be downloaded by a java agent (like a browser) in a single HTTP transaction, rather than requiring a new connection for each piece. This dramatically improves download times. jar also compresses files and so further improves download time. In addition, it allows individual entries in a file to be signed by the applet author so that their origin can be authenticated. The syntax for the jar tool is almost identical to the syntax for the tar command. A jar archive can be used as a class path entry, whether or not it is compressed.

Typical usage to combine files into a jar file is:

In this example, all the class files in the current directory are placed into the file named 'myFile.jar'. A manifest file entry named META-INF/MANIFEST.MF is automatically generated by the jar tool and is always the first entry in the jar file. The manifest file is the place where any meta-information about the archive is stored as name : value pairs. Refer to the JAR file specification for details about how meta-information is stored in the manifest file.

If you have a pre-existing manifest file whose name:value pairs you want the jar tool to include for the new jar archive, you can specify it using the -m option:

An existing manifest file must end with a new line character. jar does not parse the last line of a manifest file if it does not end with a new line character.
Note: A jar command that specifies cfm on the command line instead of cmf (the order of the -m and -f options are reversed), the jar command line must specify the name of the jar archive first, followed by the name of the manifest file: The manifest is in a text format inspired by RFC822 ASCII format, so it is easy to view and process manifest-file contents.

To extract the files from a jar file, use -x, as in:

Jar To Exe

To extract only certain files from a jar file, supply their filenames:

Beginning with Java 2 SDK v1.3, the jar utility supports JarIndex, which allows application class loaders to load classes more efficiently from jar files. If an application or applet is bundled into multiple jar files, only the necessary jar files will be downloaded and opened to load classes. This performance optimization is enabled by running jar with the -i option. It will generate package location information for the specified main jar file and all the jar files it depends on, which need to be specified in the Class-Path attribute of the main jar file's manifest.

In this example, an INDEX.LIST file is inserted into the META-INF directory of main.jar.
The application class loader will use the information stored in this file for efficient class loading. Refer to the JarIndex specification for details about how location information is stored in the index file.

A standard way to copy directories is to first compress files in dir1 to standard out, then extract from standard in to dir2 (omitting f from both jar commands):

Examples of using the jar tool to operate on jar files and jar file manifests are provided below and in the Jar trail of the Java Tutorial.

OPTIONS

c
Creates a new archive file named jarfile (if f is specified) or to standard output (if f and jarfile are omitted). Add to it the files and directories specified by inputfiles.
u
Updates an existing file jarfile (when f is specified) by adding to it files and directories specified by inputfiles. For example: adds the file foo.class to the existing jar file foo.jar. The -u option can also update the manifest entry, as given by this example: updates the foo.jar manifest with the name:value pairs in manifest.
x
Extracts files and directories from jarfile (if f is specified) or standard input (if f and jarfile are omitted). If inputfiles is specified, only those specified files and directories are extracted. Otherwise, all files and directories are extracted. The time and date of the extracted files are those given in the archive.
t
Lists the table of contents from jarfile (if f is specified) or standard input (if f and jarfile are omitted). If inputfiles is specified, only those specified files and directories are listed. Otherwise, all files and directories are listed.
i
Generate index information for the specified jarfile and its dependent jar files. For example:

generates an INDEX.LIST file in foo.jar which contains location information for each package in foo.jar and all the jar files specified in the Class-Path attribute of foo.jar. See the index example.

f
Specifies the file jarfile to be created (c), updated (u), extracted (x), indexed (i), or viewed (t). The -f option and filename jarfile are a pair -- if present, they must both appear. Omitting f and jarfile accepts a 'jar file' from standard input (for x and t) or sends the 'jar file' to standard output (for c and u).
v
Generates verbose output to standard output. Examples shown below.
0

Jar To Exe File

(zero) Store without using ZIP compression.
M
Do not create a manifest file entry (for c and u), or delete a manifest file entry if one exists (for u).
m
Includes name:value attribute pairs from the specified manifest file manifest in the file at META-INF/MANIFEST.MF. A name:valueJar pair is added unless one already exists with the same name, in which case its value is updated.

On the command line, the letters m and f must appear in the same order that manifest and jarfile appear. Example use:

You can add special-purpose name : value attribute pairs to the manifest that aren't contained in the default manifest. For example, you can add attributes specifying vendor information, version information, package sealing, or to make JAR-bundled applications executable. See the JAR Files trail in the Java Tutorial for examples of using the -m option.
e
Sets entrypoint as the application entry point for stand-alone applications bundled into executable jar file. The use of this option creates or overrides the Main-Class attribute value in the manifest file. This option can be used during creation of jar file or while updating the jar file. This option specifies the application entry point without editing or creating the manifest file.
For example, this command creates Main.jar where the ExeMain-Class attribute value in the manifest is set to Main:

The java runtime can directly invoke this application by running the following command:

Jar To Exe Key

If the entrypoint class name is in a package it may use either a dot ('.') or slash ('/') character as the delimiter. For example, if Main.class is in a package called foo the entry point can be specified in the following ways: or Note: specifying both -m and -e options together when the given manifest also contains the Main-Class attribute results in an ambigous Main.class specification, leading to an error and the jar creation or update operation is aborted.
-Cdir
Temporarily changes directories (cddir) during execution of the jar command while processing the following inputfiles argument. Its operation is intended to be similar to the -C option of the UNIX tar utility. For example: changes to the classes directory and add the bar.class from that directory to foo.jar. The following command, changes to the classes directory and adds to foo.jar all files within the classes directory (without creating a classes directory in the jar file), then changes back to the original directory before changing to the bin directory to add xyz.class to foo.jar. If classes holds files bar1 and bar2, then here's what the jar file contains using jar tf foo.jar:
-Joption
Pass option to the Java runtime environment, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xmx48M sets the maximum memory to 48 megabytes. It is a common convention for -J to pass options to the underlying runtime environment.

COMMAND LINE ARGUMENT FILES

To shorten or simplify the jar command line, you can specify one or more files that themselves contain arguments to the jar command (except -J options). This enables you to create jar commands of any length, overcoming command line limits imposed by the operating system.

An argument file can include options and filenames. The arguments within a file can be space-separated or newline-separated. Filenames within an argument file are relative to the current directory, not relative to the location of the argument file. Wildcards (*) that might otherwise be expanded by the operating system shell are not expanded. Use of the @ character to recursively interpret files is not supported. The -J options are not supported because they are passed to the launcher, which does not support argument files.

When executing jar, pass in the path and name of each argument file with the @ leading character. When jar encounters an argument beginning with the character @, it expands the contents of that file into the argument list.

For example, you can use a single argument file named classes.list to hold the names of the files:

Then execute the jar command passing in the argfile:

An argument file can be passed in with a path, but any filenames inside the argument file that have relative paths are relative to the current working directory, not the path passed in. Here's such an example:

EXAMPLES

To add all the files in a particular directory to an archive (overwriting contents if the archive already exists). Enumerating verbosely (with the v option) will tell you more information about the files in the archive, such as their size and last modified date.

If you already have separate subdirectories for images, audio files and classes, you can combine them into a single jar file:

To see the entry names in the jarfile, use the 't' option:

To add an index file to the jar file for speeding up class loading, use the -i option.

Let's say you split the inter-dependent classes for a stock trade application, into three jar files: main.jar, buy.jar, and sell.jar. If you specify the Class-path attribute in the main.jar

Jar To Exe

manifest as: then you can use the -i option to speed up your application's class loading time: An INDEX.LIST file is inserted to the

Jar To Exe Online

META-INF directory which will enable the application class loader to download the specified jar files when it is searching for classes or resources.

SEE ALSO

The Jar Overview

Jar To Exe Online

The Jar File Specification
The JarIndex Spec
Jar Tutorial on the Java Software web site.
pack200 Reference Page
Copyright © 1993, 2020, Oracle and/or its affiliates. All rights reserved.