Universal Messaging 10.3 | Developer Guide | Enterprise APIs | Running the Sample Applications
 
Running the Sample Applications
In order to make it easy for you to test the rich functionality provided by Universal Messaging, the Universal Messaging installation includes compiled versions of all the sample applications as well as native launchers that wrap them and use environment variables to minimize the input required by the user.
In preparation for running the sample applications, you need to open a command prompt at the operating system level, and type in appropriate commands to set up the environment for the sample applications, as described below.
Client Command Prompts on Windows
The client command prompt is a console/shell with environment variables set by a client environment script. Examples of such environment variables include RNAME, PATH, CLASSPATH, Certificate stores etc.
On Windows platforms, you can open a client command prompt using a shortcut in the Windows Start menu. The shortcut is Software AG > Tools > Universal Messaging Clients n.n > <InstanceName> > Universal Messaging Client Examples Command Prompt for <InstanceName> n.n, where <InstanceName> is the name of the Universal Messaging realm server instance, and n.n is the product version number.
If you want to run the Java, .NET or C++ sample applications that are delivered with the product, you need to set up the appropriate environment in the command prompt. To do this, proceed as follows:
Java
Run the command:
<InstallDir>/UniversalMessaging\java\<InstanceName>\bin\env.bat
This will set up all the environment configurations which are required to compile and run the Java samples.
Note:
You can run the Universal Messaging Tools Runner tool ("runUMTool") from the same command prompt as for the Java sample applications.
.NET (C#)
Run the command:
<InstallDir>/UniversalMessaging\java\<InstanceName>\bin\dotnetenv.bat
This will set up all the environment configurations which are required to compile and run the .NET (C#) samples. Additionally, it will redirect the command prompt location to the .NET examples.
C++
Run the command:
<InstallDir>/UniversalMessaging\java\<InstanceName>\bin\cplusenv.bat
This will set up all the environment configurations which are required to compile and run the C++ samples. Additionally, it will redirect the command prompt location to the C++ examples.
Note:
There are some further steps required to compile the C++ sample applications before running them. These steps are described in the section C++ Prerequisites.
Client Command Prompts on UNIX-based platforms
On UNIX-based platforms, you open a client command prompt by executing the appropriate softlink in the links folder under the install directory:
cd ~/<InstallDir>/UniversalMessaging_<version>/links/Client/umserver
where <version> is the product version number.
If you want to run the Java, .NET or C++ sample applications that are delivered with the product, you need to set up the appropriate environment in the command prompt. To do this, use one of the following commands:
*For Java:
./Java\ Examples\ Command\ Prompt
*For .NET:
./DotNet\ Examples\ Command\ Prompt
*For C++:
./C++\ Examples\ Command\ Prompt
As an alternative to using the above commands in UNIX-based platforms, you can set up the environment by using one of the following commands:
Java
Run the command:
<InstallDir>/UniversalMessaging/java/<InstanceName>/bin/env.sh
This command also redirects the command prompt location to the Java examples.
.NET (C#)
Run the command:
<InstallDir>/UniversalMessaging/java/<InstanceName>/bin/dotnetenv.sh
This command also redirects the command prompt location to the .NET examples.
C++
Run the command:
<InstallDir>/UniversalMessaging/java/<InstanceName>/bin/cplusenv.sh
This command also redirects the command prompt location to the C++ examples.
Note:
There are some further steps required to compile the C++ sample applications before running them. These steps are described in the section C++ Prerequisites.