Execute Java Method Step
Use the Execute Java Method step to execute a specified static or non-static method of a Java class for a defined variable.
Note | You can only use methods compatible with JDK 1.4.2_05 (Java 2), |
The expression language now allows calling Java methods directly on objects, variables or other expressions in a form natural to Java developers.
For example, you could enter:
<var>.toString()
to invoke the to String() method of the object stored in the specified script variable. This is more useful for calling static methods, as they do not require a dummy variable of the same type. One can simply say:
<classname>.<method>(<args>)
The Execute Java
Method customizer window contains two tabs:
-
Explore Tab (Execute Java Method Step)
-
Explore Class Information Tab (Execute Java Method Step)