- Deploying a Java application (generated by WINDEV)
- Running the application
- Example of command line:
Like for any application, WINDEV allows you to create a setup program for Java applications. This setup procedure is available for Windows only. The setup program is an executable. It can be used to install the necessary files as well as the Java Runtime Environment (JRE). For other platforms, you need to deploy your files manually.
To start the setup creation wizard, go to the "Project" tab, "Generation" group, expand "Setup procedure" and select "Create setup procedure".
Deploying a Java application (generated by WINDEV)
Remark: Mac OS X 10.9 minimum.
- Install JRE (Java Runtime Environment) on the target computer.
Remark: The JRE for Windows, Linux, Apple Mac OS X, Solaris can be downloaded from http://www.oracle.com/technetwork/java/javase/downloads/index.html.
- Copy the archive generated by WINDEV onto the target computer.
You must also copy all the files used by the application (images, text files, ...).
- If the Java framework of WINDEV was not included in the generated archive:
Copy the wd280java.jar file in the same directory as the archive generated by WINDEV.
- If the application uses a JDBC driver that was not included in the generated archive:
Copy the archive (or the class files) of the JDBC driver in the same directory as the archive generated by WINDEV.
- If the application uses the HFSQL engine:
Copy the following elements in the directory of the archive generated by WINDEV:
- the analysis (.WDD file).
- the data files.
Reminder: On Linux and Mac, the HFSQL data files must be written in lowercase without any accented characters.
- the native libraries for accessing HFSQL:
- for an execution in Windows: wd280jav.dll, wd280hf.dll, wd280sql.dll and wd280vm.dll. These files are available in the Programs subdirectory of the WINDEV setup directory.
- for an execution in Linux: wd280jav.so, wd280hf.so, wd280sql.so, wd280vm.so. These files are available in the "Programs\Data" subdirectory of the WINDEV setup directory.
Remark: the modules for accessing Hyper File 5 as well as the Native Connectors are not available for Linux in this version. You must use HFSQL Classic or a JDBC access.
In most cases, the archive generated by WINDEV is a self-executable archive (the manifest of the archive contains the information required for its execution).
A double click performed on the archive starts its execution.
However, the double click may not operated in some cases.
List of known cases where the double click does not operate:
- the "Java" executable is not associated with the JAR extension.
- the name of the JDBC driver is too long and it was not copied properly into the manifest.mf file generated by the tool for creating jar.exe archives, which makes the manifest unusable.
In this case, the archive can be run by using the command line copied to the <Archive name>.bat file.
This file is automatically generated by WINDEV when generating the archive of the application.
CAUTION: This command line was generated for the compilation computer. This line may have to be adapted for the target computer.
Example of command line:
"C:\j2sdk1.4.2_04\bin\java.exe" -classpath MyProject.jar;
Details of the command line:
|Full path of the Java executable to run the generated archive.|
|List of archives (.JAR) required to run the application.|
MyProject.jar is the name of the archive generated by WINDEV.
In this example, neither the framework nor the JDBC driver of MySQL have been included in the generated archive: they are added into the classpath, separated by ';' (semicolons).
|This is the name of the Java class containing the "main" method, start point for the execution of the application.|
This name is automatically generated by WINDEV from the name of the project.
For more details, see the documentation of the "java" executable.