ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Java functions
  • Call to JavaLoad
  • Error
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
JavaExecute (Function)
In french: JavaExecute
Starts a Java application or a Java applet by invoking the "Main" method of a given Java class.
Caution:
  • The path of the class to run must be specified by JavaLoad.
  • The Java class run must implement the following method: "Static public void main(String[] args)".
// Full paths where the classes (*.class) will be sought
// Note: Specify the names of folders/directories and the names of .jar or .zip
// (and not just the name of .class)
JavaLoad("D:\sources\AppJava1\classes.Zip;D:\sources\Example\JavaTest")
JavaExecute("Application", "MyString")
Syntax
JavaExecute(<Class name> [, <Parameter>])
<Class name>: Character string
Name and directory of the class to run. This parameter is case-sensitive: it must exactly correspond to the name specified in the class.
If the class is contained in one or more packages, the full path of this class must be specified with the "/" character as separator. Example: "MyPackage/MySubPackage/MyClass".
<Parameter>: Optional character string
Parameter that must be sent to the Java application.
Remarks

Call to JavaLoad

  • A single call to JavaLoad must be performed in a WINDEV application or in a WEBDEV site.
  • One of the following versions of SUN Java virtual machine is required: version 1.1, 1.2 (or sub-version), 1.3 (or sub-version), 1.4 or 6.
WEBDEV - Server codeWindowsLinuxAjax

Error

If an error occurs when running the specified class, the corresponding error message is displayed in a message box and the WINDEV application (or the WEBDEV site) is stopped.
Related Examples:
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)
Component: wd290jav.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/03/2023

Send a report | Local help