Running BBj from the Command Line

When invoking BBj, command line options may be used.

bbj {-?} {-a<string>} {-c<configuration file>} {-d} {-n<string>}
{-q} {-t<terminal alias>} {-u<user id>} {-CP<classpath name>}
{-FC} {-LF<look and feel>} {-LO} {-LP<local port number>}
{-MDI<mdiMode>} {-RH<host name>} {-RP<port number>}
{-SC} {--keystore=<keystore> --keypass=<keystore password>}
{-TC} {-WD<working directory>} {-TCPSpreload} {-TCPSto<secs>} {-TCPShb<secs>} <program>


Displays a usage statement.


Associates the Sysconsole settings with a particular application so that the size, font, and position of the Sysconsole are saved when the session and is closed and recalled when the Sysconsole is invoked again with a particular application name.

c<configuration file>

Name of the configuration file on the remote machine to use.


Invokes BBj in debug mode. In this mode, when BBj drops to console, debugging takes place in the BBj WinConsole.


Same as "a".


Suppresses the start-up message and is useful when running PRO/5 in background.

t<terminal alias>

The alias of a terminal specified in the configuration file. FID(0) will return this alias in the Thin Client program.

u<user id>

Specifies the user account to be used for Data Server and AppServer access.

CP<classpath name>

Specifies the session-specific classpath for the session.


Runs in Fat Client mode (non-Thin Client)

LF<look and feel>

In BBj 5.0 and higher, this specifies the look and feel the BBj session uses. Valid options are:

default = uses the look and feel of the native operating system; Windows look and feel when running Windows; Mac look and feel running on a Mac, "cross" for cross-platform, etc. For example, bbj –Lfdefault.

cross = uses the default Java look and feel; "ocean" in JVMs 1.5 and higher, and "metal" in JVMs prior to 1.5.

none = do not attempt to set or change the look and feel in any way. This is intended for use with a launcher program such as skinit, which sets the look and feel before BBj is started.

skinlf:theme = use the skinlf.jar look and feel.
You may use a filename or a URL to specify the specific theme, but you must use forward slashes for the path separator regardless of platform. For example, to

  • use a file

  • use a URL


bbj -LFskinlf:


vpro5 = emulates the Visual PRO/5 look and feel on all platforms, regardless of operating system.


Loads but does not run the specified program


Specifies the Port Request Server's (PRS) port. The executable connects to the PRS to get the appropriate port to use to connect to the ThinClientProxyServer. By default, the PRS uses port 2008. The PRS's port may be changed using the Enterprise Manager.


In 9.0 and higher, specifies the mdiMode that will be used if this command is being executed within a MDI environment.

RH<host name>

Specifies the machine name or IP address of the server on which the ThinClientServer (TCS) or SecureThinClientServer (STCS) if using the -SC argument) resides. The executable connects to the ThinClientProxyServer (TCPS) on the local machine (refer to -LP<local port number>). The TCPS connects to the TCS (or STCS) on the machine specified by this argument using either the default port or the port specified with the option -RP<remote port number>.

RP<port number>

Specifies the ThinClientServer's (TCS) port on the remote machine. The executable connects to the ThinClientProxyServer (TCPS) on the local machine (see -LP<local port number>). The TCPS makes the connection to the remote machine (specified with the -RH<host name> argument) using the remote port number. If no remote port number is specified, the default port, 2003, is used. When using the -SC flag, the TCPS connects to the SecureThinClientServer (STCS). The STCS default port is 2103. The ports used by TCS and STCS can be changed using Enterprise Manager.


Specifies a secure connection between the Thin Client and the Thin Client Server.


Specify a keystore to validate the SSL/TLS certificate from the secure Thin Client Server. This is only useful for the SC option if a custom keystore has been configured for the secure Thin Client Server.

keypass=<keystore password>

Specify the password for the keystore specified by the keystore option.


Runs the interpreter in Thin Client mode

WD<working directory>

Specifies the server directory in which BBj will start


In BBj 17.00 and higher, the BBj.exe/bbjinit executable checks with the PortRequestServer to see if a ThinClientProxyServer for the user/host/display is running. If one is not running, the executable starts up the TCPS.

In either case, whether it starts a TCPS or one is already running, the executable terminates without starting an interpreter.

(Note: no license is checked out since no interpreter is started.)


In BBj 17.00 and higher, if the TCPS is started by this invocation of the executable, <secs> is passed to the TCPS as the "death wait" timeout.

The "death wait" timeout is how long the TCPS stays up with no clients connected before terminating.

This can be used to keep the TCPS up and running so it is not restarted each time a new BBj session is started.

This overrides the property


found in the file. This allows the timeout to be set differently for individual TCPSs.


In BBj 17.00 and higher, if the TCPS is started by this invocation of the executable, <secs> is passed to the TCPS as the "heartbeat" timeout.

The "heartbeat" timeout is used by the TCPS to check the status of the ProxyManagerServer (PMS). If the PMS goes down, then the TCPS shuts down. Normally, the PMS is started as part of BBjServices, so when  BBjServices is shutdown the PMS is also shutdown.


Name of the program on the remote machine to run.

Exiting BBj

To exit BBj console mode, enter "RELEASE" or "BYE" to return to the host operating system.

NOTE: Never exit BBj or any BBj application by turning off or rebooting your computer. Any files that are still open may be corrupted by this improper procedure.


bbj -TC -RHfudd -cAcctConfig.bbx accounting.bbj

bbj -TC –SC -RHfudd -cAcctConfig.bbx -tT23 accounting.bbj

bbj -TC -RHfudd -cAcctConfig.bbx -tT23 accounting.bbj

bbj -TC -RH3045 -cAcctConfig.bbx accounting.bbj

bbj -TC accounting.bbj

In the final example below, the bbj executable connects to the PortRequestServer (PRS) on the local machine using port 3010. The executable gets the appropriate ThinClientProxyServer's (TCPS) port from the PRS. Once connected to the TCPS on the local machine, the TCPS connects to the ThinClientServer using port 4003 on the remote host johnny. This example also shows how to pass arguments in BBj, just as in PRO/5.

bbj -LP3010 -RHjohnny -RP4003 - arg1 arg2

If the following invocation would start a ThinClientProxyServer (TCPS), it starts one with a death wait of 1 hour (3600 seconds) and a ProxyManagerServer (PMS) heartbeat of 5 minutes (300 seconds).

> bbj -TCPSpreload -TCPSto3600 -TCPShb300

The TCPS started by this invocation would stay up one hour without any clients connected. Once all clients disconnect and the hour has passed without any new clients, the TCPS will shutdown.

Additionally, the TCPS pings the PMS every 5 minutes. If BBjServices shutdowns (which would shutdown the PMS) the TCPS shutdowns after the next heartbeat check (within 5 minutes).

See Also

BBjServices Overview


Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.