Exec Java

Executes the defined java method.

Parameters

method
The name of the class and method to be executed.
Wetator first searches for static methods with the given name.
Wetator searches for methods
  • with the same number of string parameters as strings given by the second parameter
  • with exactly one parameter of type List<String> or
  • with a vararg of type string.
If nothing found then Wetator looks for a default constructor and if one is available, Wetator creates an instance and performs the same lookup for instance methods.
args
The parametes for the method call.
It is possible to provide a comma separated list of strings.

Classpath

Of course you have to add your class (and all required classes) to the classpath. For the command line client simply copy the jar file into the lib directory. If you start wetator from inside eclipse, adjust the run configuration. For the ant task, you can define a separate classpath containing your stuff. The ant task uses a separate class loader to load your classes and shield your classes from the ant environment.

Examples

Execute a static method

Call the static method 'staticMethodWithTwoParams(String, String)' in class 'org.rbri.wet.commandset.ExecTester'

Command Parameter Optional Parameter
exec-java org.rbri.wet.commandset.ExecTester.staticMethodWithTwoParams one, two