WINDEV Concepts
Part 2: Development environment 83 Java applications in practice 1 Overview WINDEV allows you to generate Java applications without previous experience in Java development. As for all WINDEV applications, the application is developed in WLanguage. 1.1 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 Web site of the database publisher). HFSQL databases are accessed natively (in Windows and Linux only) via the SQL WLanguage functions. No additional driver is required. A Java application corresponds to a ".jar" file. It requires the Java Runtime to be executed. To compile (in Java) a Java project created with WINDEV , the Oracle J2SDK (version 1.4.2 or later) must be installed on the development computer. A version is available on the WINDEV setup media. This program can also be downloaded from the Oracle site. 1.2 Why develop a Java application with WINDEV? You have developed a WINDEV application that runs on Windows and you want to make it accessible on any operating system? Generate a Java application so that Mac OS users can use your application, for example. This allows you to share network applications. 1.3 Generating a Java application with WINDEV As mentioned above, you don’t need to have previous experience in Java development to develop a Java application with WINDEV. You can develop your applications in WLanguage like any other WINDEV application and, when compiling the project, the windows and WLanguage functions are automatically converted to Java. Remark : the number of WLanguage functions that can be used in a Java project is limited in this version. This number of functions will increase in forthcoming versions. 2 Features of a Java project 2.1 Creating a Java project A Java project can be created like any WINDEV project: 1. Click in the WINDEV quick access buttons. The new element window appears: click "Project". 2. The project creation wizard starts. 3. In one of the first steps, the wizard allows you to choose the project generation mode. Select "Java archive" and continue. By default, a WINDEV project for Java corresponds to a specific project configuration. The type of project generation can be changed at any time. Simply create a new project configuration. Once the project has been configured as a Java project, all the tools available in WINDEV are automatically configured for the Java project: • The window RAD or the full RAD is specific to a database handled by a Java application. • The compiler indicates whether the project contains functions or controls that cannot be used in Java. A purple message is displayed in the "Compilation errors" pane. • The creation of the archive makes it possible to generate a ".jar" file in the EXE directory of the project. • The setup module only handles the files required to deploy the Java application. Remark : it is recommended to create a new WINDEV project to develop a Java application rather than converting a WINDEV application to Java.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==