ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing in Java
  • Overview
  • Deploying a Java application (generated by WINDEV)
  • Running the application
  • Example of command line:
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
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)
  1. 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.
  2. Copy the archive generated by WINDEV onto the target computer.
    You must also copy all the files used by the application (images, text files, ...).
  3. If the Java framework of WINDEV was not included in the generated archive:
    Copy the wd290java.jar file in the same directory as the archive generated by WINDEV.
  4. 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.
  5. 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: wd290jav.dll, wd290hf.dll, wd290sql.dll and wd290vm.dll. These files are available in the "Programs" subdirectory of the WINDEV installation directory.
      • for an execution in Linux: wd290jav.so, wd290hf.so, wd290sql.so, wd290vm.so. These files are available in the "Programs\Data" subdirectory of the WINDEV installation 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.
Remark: Mac OS X 10.9 minimum.
Running the application
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;
WD290java.jar;mysql-connector-java-3.0.14-production-bin.jar GWDPMyProject
Details of the command line:
"C:\j2sdk1.4.2_04\bin\java.exe"Full path of the Java executable to run the generated archive.
classpath MyProject.jar;wd290java.jar;mysql-connector-java-3.0.14-production-bin.jarList 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).
GWDPMyProjectThis 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.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 02/28/2024

Send a report | Local help