PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Call to JavaLoad
  • Error
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
JavaExecute (Function)
In French: JavaExécute
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 (with quotes)
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 (with quotes)
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.
    Java JavaLoad can be called as many times as necessary.
  • 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.
WINDEVWEBDEV - Server codeReports and QueriesWindowsLinuxAjaxUser code (UMC)

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)
Components
WINDEVWEBDEV - Server codeReports and Queries wd230jav.dll
Linux wd230jav.so
Java wd230java.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment