|
|
|
|
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 - 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.
Related Examples:
|
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)
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|