Running a Jade Non-GUI Client Application with Parameters
You can run any application type run from the non‑GUI client, including a standard (fat) client, a thin (presentation) client, non‑GUI applications, and so on, using the jadclient executable.
Not all RootSchema applications can be invoked using this functionality.
When initiating a Jade client application using the non‑GUI jadclient executable, you can collect strings from the command line and pass them to the initialization method of the application, by specifying the arguments after the startAppParameters or endJade argument in the command line. Only the application initiated using the command line argument uses these command line arguments.
When running a non-GUI Jade client application using the jadclient.exe:
-
The arguments recognized in the command line are startAppParameters and endAppParameters.
-
The elements between the startAppParameters and endAppParameters arguments are added to a transient HugeStringArray object that is created.
The added elements are a unary string (for example, DailyTests) or a coupled pair separated by a = character (for example, codeCoverage=true). For example, startAppParameters c:\jade\unittest.xml DailyTests codeCoverage=true profile=true c:\jade\logs\unittest.log endAppParameters results in a HugeStringArray of:
-
c:\jade\unittest.xml
-
The test name (that is, DailyTests)
-
codeCoverage=true
-
profile=true
-
c:\jade\logs\unittest.log
-
-
The built HugeStringArray object is passed to the defined initialize method for the invoked application. That method must therefore expect a parameter of a HugeStringArray type. If not, exception 4027 (Method called with incorrect number of parameters) is generated for the parameter mismatch.
When processing the elements after the startAppParameters argument:
-
The elements are separated by spaces.
-
Leading and trailing spaces in each string element are removed.
-
All subsequent arguments up to the endAppParameters argument or the end of the command line if the endAppParameters argument is not present are collected into a HugeStringArray and passed to the initialize method of the application.
Support for the endJade argument is maintained to provide backward compatibility for existing applications. It is recommended that your applications use the startAppParameters and endAppParameters arguments.
-
Any double or single quotes around elements are dropped.
-
Any spaces just before and directly after the = sign are dropped.
Note also:
-
If no such command line arguments are specified, the initialize method is passed a null value if it requires a parameter.
-
Any spaces just before and directly after the = sign are dropped. The = sign and the value are passed through as a single string in the HugeStringArray.
-
The created transient object is deleted when the initialize method call completes.
-
This feature applies only to the application being initiated from the command line of jadclient.
The following example specifies the non‑GUI client Jade executable (jadclient.exe) command line for the non‑GUI JadeUnitTestBatch application.
jadclient path=c:\jade\system schema=TestUnitTestSchema ini=c:\jade\system\jade.ini app=JadeUnitTestBatch startAppParameters c:\jade\unittest.xml DailyTests codecoverage=true profile=true output=true c:\jade\logs\unittest.log endAppParameters
The following example specifies the non‑GUI client Jade executable (jadclient.exe) command line for the GUI No FormsJadeUnitTestGuiNoForms application.
jadclient path=c:\jade\system schema=TestUnitTestSchema ini=c:\jade\system\jade.ini app=JadeUnitTestGuiNoForms startAppParameters c:\jade\unittest.xml DailyTests codecoverage=true output=true c:\jade\logs\unittest.log
2016.0.03 (Service Pack 2) and higher