JavaExe
version
3.0.2 (14-Feb-2007)
JavaExe makes it possible
to launch your Java application starting from an .exe as if it were about a
Windows application, a system service, or a Control Panel.
With this new version, you can now :
- to define your Java application running as control panel of Windows.
- to put the application in icon of the taskbar, with its own menu.
- to define a Windows service with an interactive part (with an icon in the taskbar).
- to receive the systems events of Windows, and to be able to manage them in the Java application.
- to launch only one instance of the application at the same time.
- to have a Screen Splash of starting.
- to use any format of icon for the .exe
It is quite
simply enough to copy JavaExe.exe (and JavaExe.cpl for a Control Panel) in your directory containing the
Java application, then to give him the same name as your .class or .jar
principal. JavaExe.exe is provided with a
console version, JavaExe_console.exe, to allow have a
console DOS to print on standard output. All that will be said on JavaExe.exe apply to JavaExe_console.exe.
|

|
If my main class names MyApp.class, I copy and rename
JavaExe.exe to MyApp.exe
In the same way for a .jar, if my main class is contained in
MyApp.jar, then I rename JavaExe.exe to
MyApp.exe. That implies that the main class is named also
MyApp.class
|
The .class or .jar must be in the same directory as the .EXE or in a
directory named by default "resource" has to create on the same level as the
.EXE
|

|
If MyApp.exe is in the directory "D:\Dev\", then
:
- MyApp.class or MyApp.jar is either in
"D:\Dev\"
- or in the directory
"D:\Dev\resource\ "
|
JavaExe isn’t an independent executable of a JDK or of a
JRE, it is necessary to have installed at least a Java Runtime Environment
(JRE). If JavaExe doesn’t detect a JDK or JRE, it will open an
Internet browser to the Sun’s
website to download the current JRE.
You can provide a JRE with your application. In this case, you must put it in
a directory named "jre", itself in the directory of the EXE or the directory
"resource".
It’s possible to specify which minimum version of Java you wish to use to
launch your application. For that you must create a file,
JavaExe.properties, bearing the same name as the main .class or .jar (as
for the renaming of JavaExe.exe).
This file contains 12 properties used by JavaExe :
- JRE version (or
JREversion) = to
specify the minimum version of java: 1.4 ; 1.3 ; ...
- Run Type (or
RunType) =
to specify how the application must be launched : '2' for a ControlPanel, '1' for a
service-application, or ' 0' (or nothing) for a normal application.
- Main Class (or MainClass) = to indicate the complete name of your main .class if it's in a package : myPackage.MyClass (only if there is no Manifest file in the .jar).
- Main Args (or MainArgs) = these values will have passed in arguments to the main method of your main class, in the variable (String[] args).
- Resource Directory (or
ResourceDirectory) = to
specify the resource directory containing the DLL, the image, the properties
files,…. If this parameter isn’t specify, the directory named
« resource » will be use by default.
- Class Directory (or
ClassDirectory) = to specify
the directories (separated by ‘;’) to recursively scan to find all .jar or
.zip files to add in the ClassPath.
- Personal Classpath (or
PersonalClasspath) = if your
application needs additional .jar or .class files or being in other
directories.
- Personal Options (or
PersonalOptions) = to
specify the JVM parameters.
- Path JRE (or PathJRE) = pathname of the JRE if it is provided with the application. By default it will be required in the directory “jre” on the same level as the .exe or in the directory “resource”.
- Path Browser (or PathBrowser) = pathname of the browser to be used for the installation possible of a JRE (by default it is the pathname of InternetExplorer).
- Display BoxInstall (or Display_BoxInstall) = to indicate if a message must be displayed when JavaExe does not find a JRE or JDK, and asking whether one wishes to install a JRE or to leave the application. Only two values are accepted : '0' or '1'.
- URL InstallJRE (or URL_InstallJRE) = allows to indicate a URL on which JavaExe will open a browser if no JRE or JDK is found with the launching of the application. If this property is not indicated, it is the URL on java.sun.com which will be taken.
There can be other properties if your application uses this same file for its
own needs.
|

|
If MyApp.exe is in the directory "D:\Dev\", then
MyApp.properties can be in this same directory or
"D:\Dev\resource\".
In this example, MyApp.properties contains :
-
JRE
version = 1.2
-
Personal
Classpath = .\resource\classes12.zip
-
MainArgs
= "test" 123
MyApp will then be launched with Java 1.2 (or higher),
and the corresponding command-line is :
java -classpath
.;.\MyApp.jar;.\resource\MyApp.jar;.\resource\classes12.zip MyApp "test"
123
|
to see the complet doc :
|
JavaExe is
provided with another program, UpdateRsrcJavaExe, making it
possible to change the icon of your MyApp.exe. To change
the icon, you must drag your MyApp.exe and your icon file (in .ICO format) to UpdateRsrcJavaExe.exe.
|
|
JavaExe
and UpdateRsrcJavaExe are creations and copyrighted of DevWizard
(DevWizard@free.fr).
You are free to be useful
to you about it and to provide them with your applications which you wish
to distribute, who they are freeware, shareware or commercial. Only
DevWizard is authorized to make an unspecified modification to
JavaExe and UpdateRsrcJavaExe.
Any request for
modification can be made by mail to DevWizard@free.fr
|