Command-Line Options for Intermapper Clients
Two client applications are available for Intermapper:
- Intermapper client runs on the same machine as Intermapper Server, so it has a limited set of command-line arguments.
- Intermapper Remote Access client runs on any machine, and connects to multiple Intermapper servers, so it has a larger set of options.
Usage:
java -jar [jar file] [Options]
- For Intermapper client, the jar file name is
Intermapper.jar. - For Intermapper Remote Access, the jar file name is
Intermapper_Remote Access.jar. - Depending on your installation, you may need to change your working directory, supply the full path to the jar file, or both. See 1, below.
You can call Intermapper Remote Access from a command line, and control a significant number of functions. This can be useful for automating the updating of maps, or for various testing purposes.
Intermapper clients support the following command-line arguments:
- IMRA - Applies to Intermapper Remote Access client only
- Both - Applies to both Intermapper and Intermapper Remote Access clients
Microsoft Windows Users
The syntax for Microsoft Windows users is essentially the same as the Linux examples below, except that the command line may require that the working directory must be set to the Intermapper installation folder, or Java jar file must include the full Windows path.
The following example sets the working directory to the Intermapper server installation folder, invokes java with the .jar file, and opens the MyNetwork1 and MyNetwork2 maps.
cd "C:\Program Files\Intermapper"java\bin\java.exe -jar "Intermapper.jar" --map MyNetwork1 --map MyNetwork2
Understanding How the Shell Executes Programs with Intermapper Remote Access
When you enter a command in the shell, the first word is interpreted as the name of the program you want to run. For example, typing java tells the shell to execute a program named java. The shell searches for this program in predefined directories listed in your system PATH environment variable.
If the program is not installed or not found in any of those directories, the shell returns an error indicating that the command cannot be located.
In cases where you are using a local binary (for example, a program located in your current working directory), you must specify its path explicitly. This is done using ./, where:
-
. refers to the current directory.
-
/ is the path separator.
-
./java tells the shell to run the java binary located in the current directory.
This approach ensures the shell knows exactly where to find and execute the desired program.
Import Command Examples
To import to a specified server, IM Remote is invoked as follows:
java -jar <jar-file> --host <Intermapper-server> [--user <username> --pass <password>] --import <import-file>
The following example reads imported data from newdata.tab:
java -jar Intermapper_Remote Access.jar --host big.dartware.com --user admin --pass adminpw --import newdata.tab
The following example reads imported data from stdin:
java -jar Intermapper_Remote Access.jar --host big.dartware.com --user admin --pass adminpw --import -
The stdin form of the --import option allows users to create self-contained executable files that import stuff:
#!/usr/bin/java
-jar Intermapper_Remote Access.jar --host big.helpsystems.com --import -#import blah blah
blah blah blah
blah blah blah
blah
One use for this would be to automate testing of Intermapper Server.
Export Command Examples
To export from a specified server, IM Remote is invoked as follows:
java -jar <jar-file> --host <Intermapper-server> [--user <username> --pass <password>] \
--export "format=<output-type> table=<table-name> fields=<field-list>
The following example writes exported data to stdout:
java -jar Intermapper_Remote Access.jar --host big.dartware.com --user admin --pass adminpw --export "format=tab table=devices fields=*"