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 Microsoft Windows Users, 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

connect to the specified HOST

-port --port <PORT>

Both

connect 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

import the specified file (use - for stdin)

-importmap --importmap <FILE_NAME> Both

import the specified map.

-export --export <EXPORT-SPEC>

 

export the specified data to stdout.

Note: Data for all maps is exported.

-exportmap --exportmap <MAP_ID> Both

export 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

open the specified shortcut file

-d --debug <DEBUG_CONFIG_FILE>

Both

use the specified configuration file to configure debugging output

-D<name>=<value>

Both

set a system property

-user --user <USER>

IMRA

log in as USER

-pass --pass <PASSWORD>

IMRA

log in as USER with PASSWORD

-ignore-cert-check

IMRA

accept all server SSL certificates without prompting

-agree-to-license Both

accept the End User License Agreement

-version --version

Both

print product version

-env --env

Both

print out system properties

-test --test [TIMEOUT] Both

test the connection - automatically quit after TIMEOUT seconds

-h -? --help

Both

print this help message

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

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 example below 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 example below 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 example below 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=*"