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.

NOTE: The examples below assume the Intermapper server is running on the host you are connecting to.

Intermapper clients support the following command-line arguments:

NOTE:
  • IMRA - Applies to Intermapper Remote Access client only
  • Both - Applies to both Intermapper and Intermapper Remote Access clients
Argument Client Description

-host --host <HOST>

IMRA

Connects to the specified HOST.

-port --port <PORT>

Both

Connects to the specified PORT on HOST (defaults to 8181).

-map --map <MAP_NAME>

Both

Load the specified map(s) from HOST.

For multiple maps, use one "--map" option per map.

 -import --import <FILE_NAME>

Both

Imports the specified file (use - for stdin).

-importmap --importmap <FILE_NAME> Both

Imports the specified map.

-export --export <EXPORT-SPEC>

 

Exports the specified data to stdout.

Note: Data for all maps is exported.

-exportmap --exportmap <MAP_ID> Both

Exports the specified map.

Note: The easiest way to get the map ID is to look in the Maps folder in the Intermapper Settings folder. Each map name has a prefix that begins with "g". The text between the g and the hyphen (-) is the Map ID.

-f --file <FILE_NAME>

Both

Opens the specified shortcut file.

-d --debug <DEBUG_CONFIG_FILE>

Both

Uses the specified configuration file to configure debugging output.

-D<name>=<value>

Both

Sets a system property.

-user --user <USER>

IMRA

Logs in as USER.

-pass --pass <PASSWORD>

IMRA

Logs in as USER with PASSWORD.

-ignore-cert-check

IMRA

Accepts all server SSL certificates without prompting.

-agree-to-license Both

Accepts the End User License Agreement.

-version --version

Both

Prints product version.

-env --env

Both

Prints system properties.

-test --test [TIMEOUT] Both

Tests the connection. This automatically quits after the specified TIMEOUT seconds.

-h -? --help

Both

Prints this help message.

-dmax --dmax <MAX_CHARS>

Both

Sets the maximum number of characters in the debug window.

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.

Copy
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: 

Copy
java  -jar <jar-file> --host <Intermapper-server> [--user <username> --pass <password>] --import <import-file

The following example reads imported data from newdata.tab:

Copy
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:

Copy
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: 

Copy
#!/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:

Copy
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:

Copy
java -jar Intermapper_Remote Access.jar --host big.dartware.com --user admin --pass adminpw --export  "format=tab table=devices fields=*"