AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar en Java
  • Overview
  • Generating a standard Java archive
  • Generating an application for Java Web Start
  • To generate an application for Java Web Start:
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Overview
When your Java application is developed, you can create a Java archive that can be run directly. In this case, there are several solutions:
To start creating a Java archive:
  • Display the Java project configuration in the editor.
  • On the "Proyecto" tab, in the "Generación" group, click "Generar".
Note: The current project configuration must match the Java project configuration to be generated.
Note: To compile (in Java) a Java project created with WINDEVa Java JDK (e.g. OpenJDK) must be installed on the development workstation.
Generating a standard Java archive
A standard Java archive allows you to start the application by double-clicking the generated .jar file. A .bat file is also generated if the double click does not operate.
To create the Java archive:
  1. Start the wizard for creating the Java archive:
    • Display the Java project configuration in the editor.
    • On the "Proyecto" tab, in the "Generación" group, click "Generar".
  2. Select "Generate a standard Java application". Go to the next step.
  3. Enter the name of the archive and the information found in the manifest (Company, Description and Copyright). Go to the next step.
  4. Specify the version number of Java executable. Two formats are available for the version numbers:
    • Standard format. This format is the standard format managed by Windows. This format corresponds to a set of 4 numbers separated by dots.
      • The first group of 4 digits corresponds to the number of major changes performed in the application.
      • The second group of 4 digits corresponds to the number of minor changes performed in the application.
      • The third group of 4 digits corresponds to the generation number.
        We advise you to automatically increment this number at each generation. This increment operation is automatically performed if the option "Automatically increment the version at each generation" is checked.
      • The last group of 4 digits corresponds to the number of reviews (branches in the SCM for example).
    • Format for compatibility. This format was used until version 12 by default.
      Note: All characters (numbers and letters) are allowed. For example: "1.01A".
      If the option "Automatically increment the version at each generation" is checked:
      • the version number "1.01A" will become "1.01B".
      • the version number "A14Z" will become "A15A".
  5. Specify whether the WINDEV framework for Java must be included in the .jar archive. Go to the next step.
  6. Specify the other files that must be included in the ".jar" archive. You can select the JDBC drivers used to access a database for example. Go to the next step.
  7. Specify:
    • the command of the Java compiler to use. To customize this parameter (if several compilers are installed on the computer for example), select "Custom". In this screen, you can also specify the command line that will be used (for more details, see the documentation of the compiler).
    • the command for creating the archive. The "Custom" option allows you to define the tool that will be used to create the archive. You can also specify the command line that will be used (for more details, see the documentation of the compiler) and the content of archive manifest.
    • the command for including other archives. The "Custom" option allows you to define the tool that will be used to extract the archive as well as its command line.
  8. The ".jar" archive is created.
The corresponding file was created in a subdirectory corresponding to the Java project configuration (subdirectory of EXE directory of project).
To open a file explorer on this directory, on the "General" tab, in the "Inicio" group, expand and select "Open generation directory".
The execution of Java archive is started by using the jvm of jdk used for the compilation.
You will also find a ".BAT" file in the generation directory of the Java archive. This file contains the command line required to start the application and it can be run in a Windows environment.
Note It is possible for several jvm files to be installed on the same workstation (32-bit and 64-bit jvm files, for example), and for the explorer to associate the .jar files with a different jvm file. In this case, running the archive by double-clicking the .jar file may present some differences.
For other environmentsenvironments, you need to create a file to launch the ".jar" file.
For Linux, you can create a ".sh" file containing the following command line:
"java -jar MyProject.jar"
"MyProject.jar" corresponds to the ".jar" archive generated from your project.
Note For more details on accessing databases from a Java application, see Java and database
Generating an application for Java Web Start
The Java application is deployed on a Web server and it is started from a browser on client computers. However, it is run like any standard application.
When the application is updated on the Web server, it is also updated on client computers.
This generation option simplifies the deployment and the update of a Java application.

Advertencia
As of version 2025 Update 3, the "Generate an application for Java Web Start" feature is no longer available.

To generate an application for Java Web Start:

  1. Start the wizard for creating the Java archive:
    • Display the Java project configuration in the editor.
    • On the "Proyecto" tab, in the "Generación" group, click "Generar".
  2. Select "Generate an application for Java Web Start". Go to the next step.
  3. Enter the name of the archive and the information found in the manifest (Company, Description and Copyright). Go to the next step.
  4. Specify the version number of Java executable. Two formats are available for the version numbers:
    • Standard format. This format is the standard format managed by Windows. This format corresponds to a set of 4 numbers separated by dots.
      • The first group of 4 digits corresponds to the number of major changes performed in the application.
      • The second group of 4 digits corresponds to the number of minor changes performed in the application.
      • The third group of 4 digits corresponds to the generation number.
        We advise you to automatically increment this number at each generation. This increment operation is automatically performed if the option "Automatically increment the version at each generation" is checked.
      • The last group of 4 digits corresponds to the number of reviews (branches in the SCM for example).
    • Format for compatibility. This format was used until version 12 by default.
      Note: All characters (numbers and letters) are allowed. For example: "1.01A".
      If the option "Automatically increment the version at each generation" is checked:
      • the version number "1.01A" will become "1.01B".
      • the version number "A14Z" will become "A15A".
  5. Specify the other files that must be included in the ".jar" archive. You can select the JDBC drivers used to access a database for example. Go to the next step.
  6. Define the signature parameters of the Java archive.
    • File of keys.
    • Associated password.
    • Name of key in the file.
    • Password of key.
  7. Define the parameters for deploying the Java Web Start application:
    • Deployment URL.
    • URL directory.
  8. Specify:
    • the command of the Java compiler to use. To customize this parameter (if several compilers are installed on the computer for example), select "Custom". In this screen, you can also specify the command line that will be used (for more details, see the documentation of the compiler).
    • the command for creating the archive. The "Custom" option allows you to define the tool that will be used to create the archive. You can also specify the command line that will be used (for more details, see the documentation of the compiler) and the content of archive manifest.
    • the command for including other archives. The "Custom" option allows you to define the tool that will be used to extract the archive as well as its command line.
    • the command for generating the archive file. The "Custom" option allows you to define the tools that will be used to generate the file of keys.
    • the command for signing the archive. The "Custom" option allows you to define the tool that will be used to sign the archive as well as its command line.
  9. The creation of the Java applet is completed.
The corresponding file was created in a subdirectory corresponding to the Java project configuration (subdirectory of EXE directory of project).
To open a file explorer on this directory, on the "Inicio" tab, in the "General" group, expand and select "Open generation directory".
To run the test of this applet, start the HTML page for test. This page is used to install the client Java application.
Note For details of how to access databases from a Java Web Start application, see Java and database.
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 14/05/2025

Señalar un error o enviar una sugerencia | Ayuda local