ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing in Java
  • Overview
  • What is a Java application?
  • Developing a Java application with WINDEV
  • Why develop a Java application with WINDEV?
  • Generating a Java application with WINDEV
  • The different steps for creating a Java application
  • Limitations
  • Java and the management of memory
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

What is a Java application?

A Java application is entirely compiled in Java. If this application uses a database, this database must have a JDBC driver (MySQL, Oracle, etc.). This driver is specific to each database (it can be downloaded from the Internet site of the database publisher).
The access to an HFSQL database is performed natively (in Windows and Linux only). No additional driver is required in this case.
A Java application corresponds to a ".jar" file. It requires the Java Runtime to be executed.
Developing a Java application with WINDEV

Why develop a Java application with WINDEV?

You have developed a WINDEV application for Windows and you want to make this application accessible independently of the operating system? Generate a Java application so that the users working with Mac OS for example will also be able to use your application.
This allows you to share your network applications.
Remark: Mac OS X 10.9 minimum.

Generating a Java application with WINDEV

WINDEV allows you to generate a Java application without even knowing the Java language. The method for developing the application is identical to the method for developing any other WINDEV application.
When the WINDEV project is compiled, the windows and the WLanguage functions are automatically converted into Java.
The different steps for creating a Java application
The steps for creating a Java application with WINDEV are as follows:
  1. Creating the Java project.
  2. Developing the application.
  3. Using databases.
  4. Test and compilation.
  5. Creating the Java archive:
    • Standard archive,
    • Archive for Java Web Start.
  6. Deploying the archive.

Limitations

The limitations of a JAVA application created with WINDEV affect:
  • the supported controls and features
  • the available functions
  • the programming modifications
For more details, see Available functions and limitations and Available properties.

Java and the management of memory

By default, the amount of memory allocated to the virtual Java machine (JVM) for running applications is set to 64 MB.
This amount may not be sufficient if the application requires a large amount of memory (to handle images for example). Errors ("OutOfMemoryException" or "Java Heap Space") may occur if the amount of memory is exceeded when running a Java application.
To increase the amount of memory allocated to the JVM, specify "-Xmx<size>" when the application is started. For example, to allocate 256 MB of memory to an application, specify the following command line when starting the application:
java -jar -Xmx256m MyArchive.jar
Related Examples:
WD JavaMail Training (WINDEV): WD JavaMail
[ + ] This example is a Java example used to read and send emails.
WD Managing the Java errors Training (WINDEV): WD Managing the Java errors
[ + ] WINDEV enables you to develop Java applications without even knowing Java.
You benefit from the power and from the automated processes of the WINDEV environment.
One of the most useful automated processes is the automatic management of errors.
This example presents the operating mode and the implementation of the mechanism for managing the WINDEV errors.
Some illustrations allow you to understand the simplification performed when implementing this feature.
This project is configured to generate a Java archive.
WD Java Chart Designer Training (WINDEV): WD Java Chart Designer
[ + ] WINDEV enables you to create some Java applications without even knowing Java.
You program with a 5GL (WLanguage) and WINDEV generates the Java code.
The drawing functions of WINDEV are available in Java generation.
This example explains how to create charts with these drawing functions.
Three types of charts are presented in this example:
- the bar chart,
- the scatter chart,
- and the line chart.
WD JAVA Calls Training (WINDEV): WD JAVA Calls
[ + ] WD JAVA Calls is an example containing two configurations of project:
- A "Windows Application" configuration that is used to create the executable of the application
- A "Java Application" configuration that is used to create the Java archive (.JAR) of the application
This example is supplied with a JAR archive named "JavaFunction" external to the application.
It presents the call to the methods of classes of this JAR archive via the WLanguage function named JavaExecuteFunction.
This example also explains how a memory table can be filled (identical in Java mode and in Windows mode)
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 02/01/2024

Send a report | Local help