JarWrapper
FAQ
JarWrapper is a utility which can be used to convert a
Java Application to a Windows executable file. JarWrapper creates an executable
Jar file from the Java class files and then wraps it in a Windows executable.
Hence the name “JarWrapper”. J
It’s a freeware application. You can use it to convert
your java class files into a windows application completely free of cost. However,
the source code is not made available to the public and hence it’s not an open
source application as of now.
You need to have JDK 1.2 or higher installed on your
machine in order to convert your class files into an executable. However, if
you already have prepared the executable jar file previously, then you don’t
need the JDK to convert it to Windows executable.
Just click on JarWrapper.exe and its wizard like
interface will make you flow through the entire process.
Yes, it supports Application Command Line parameters.
If your Java program expects any command line parameters, then the converted
windows executable also will expect command line parameters.
As of this version, JarWrapper doesn’t support JVM
parameters. But this is planned to be incorporated in the next version.
No, the application doesn’t support CLASSPATH entries
while preparing the executable jar file. You need to extract all the dependant
third party zip/jar files into a common folder along with your application
class files, maintaining the package hierarchy. Then you can use this
application to create the Jar file and subsequent windows exe file. If you miss
to extract/package any of the dependant jar/zip files, then even though your
application will be created, it wouldn’t execute. JarWrapper doesn’t check for
the validity of the generated jar file/exe file.
No, JarWrapper doesn’t create a true 32bit windows
executable. It only wraps the executable jar file in a Windows exe file. It
still requires Java 2 environment to run.
You can not use the JarWrapper to convert an applet to
Windows executable directly. However, you can use Applet2App to convert an applet
to an executable jar file. And then use the JarWrapper to convert it into a
Windows executable. So it’s a two-step process.
Some reasons, I can think of:
·
Your end user
need not know you have created the application java.
·
Since the end user
doesn’t know it’s a Java application, he won’t even try to demangle the jar
files, so common security hassles with java.
·
You can use a
resource editor like resource hacker to change the application icon that
appears in the windows explorer bar. This will look better than the notepad
style generic icon associated with executable jar files.
·
May be to start
with, your Jar file is not a valid executable jar file. JarWrapper doesn’t
check for the validity of the jar file. It simply wraps the file given to it as
an executable. May be we can remove this limitation in future version.
·
If you are using
JRE 1.1, then this error might come up as JRE1.1 doesn’t support the concept of
executable jar files.
·
May be you trying
to convert an applet to application directly. First use Applet2App to create
the executable jar file and then use JarWrapper to create the application.
·
May be you have
not wrapped a valid executable jar file
·
While creating a
GUI application, you have specified the application as Console application.
Then this won’t work. The reverse case is also true. If you have a console application
and you specify it as a Swing application. Then also this problem will occur.
You can use any of the freely available resource
editors in the market. I will personally recommend a tool called resource hacker to
do this.
This is because while setting the application icon in
your java code, you must have used a code snippet similar to the following
code.
setIconImage(Imagefile);
Use
an icon editor/ picture converter to create a 32x32 pixel ICO file from the Imagefile. Then use resource hacker to change the
application icon when the final executable is ready.
This actually depends upon the way you have used the
resources in your code. If you have coded in such a way that your resources can
be found from a Jar file, then you don’t need to separately package the
resources. They can be embedded inside the executable jar file and hence in the
final Windows executable. Otherwise, you need to explicitly package the
resources separately apart from the final Windows executable file.
Please refer to question no 6 for details.
The wrapper exe can not be directly used as an NT
Service. However, there are so many free tools available on net which let you
run an executable as a NT Service. May be you can try one of those executables.