Previous topic  Top  Next topic  Print this Topic

Use the OntoBroker Server from commandline


OntoBroker can be started from commandline by either using the script start-ontobroker.cmd (on Windows) or (on Linux). On Windows platforms you may also use OntoBroker32/64.exe. This executable does the same as the start-ontobroker.cmd: it automatically reads all JAR files within the lib directory and executes the inference server. Using OntoBroker.exe makes it easy to integrate OntoBroker in your own scripts.

The following command is used to launch the server:

start-ontobroker.cmd [options] [filenames] [options] [filenames]


-configFile <configFile>

The configuration file to be used (default: OntoConfig.prp).

-project <projectFile>

Use project file for advanced load configuration.


Enables OntoBroker web service. Alternatively use the parameter WebServices = on


Enables OntoBroker web service for load balancing. Alternatively use the parameter AJP = on


Enables OntoBroker web console. Alternatively use the parameter WebConsole = on


Enables OntoBroker collaboration server (implicitly sets Indexer = on); alternatively use the parameter CollaborationServer = on


Enables OntoBroker collaboration server (leaves Indexer settings unchanged)


This has nearly the same effect as the option -collabserver. The OntoBroker is tuned for query performance and some special functionalities needed for OntoStudio are not switched on. This means that an OntoStudio cannot use this instance as a collaboration server. If OntoBroker is started with -remoteAPI it behaves as a stand alone server, i.e. the inferencing mode is turned off. Alternatively use the parameter RemoteAPI = on

-fenc <encoding>

File encoding used for reading files. (e.g. chinese codes are "big5", "csBig5" and "iso_ir-58"). This is necessary when the file encoding of a concrete file differs from the default of your operating system.


Materialize the following file or directory


Materialize the following file or directory (updatable)


Executed multiple commits while loading a file


Turns off logging


-nt3 <directory or filename>

Explicitly specifies the data format for reading


Prints usage text and exits


Writes information to the log which could help to analyze bugs.


NOTE: If a parameter has been specified both in the OntoConfig and on the command line, the command line option overrules the OntoConfig settings.


start-ontobroker.cmd -webservice -collabserver -configFile OntoConfig.prp -m -flo examples/flo/Unternehmen_US.obl -obl example/flo/Process_US.obl.

If the environment variable ONTOBROKER_HOME is set, it is possible to run OntoBroker from any directory. As OntoBroker looks in the working directory for OntoConfig.prp, and for various files in the conf subdirectory by default, you have to change these defaults explicitly or copy these files in your working directory.

Changing location of OntoConfig.prp: use the command line option -configFile <configFile>
Changing location of set the Java system environment -Dlog4j.configuration=file:<filename>
Changing location of the conf directory: Explicitly set the dir.conf parameter in the OntoConfig.prp

A query is sent to the server using the command line client:

query.cmd [-h <hostname>] [-p <portno>] [-l <user>:<pwd>] <query> [-h <hostname>] [-p <portno>] [-l <user>:<pwd>] <query>


A command is sent to the server using the command line client:

command.cmd [-h <hostname>] [-p <portno>] [-l <user>:<pwd>] <command> [-h <hostname>] [-p <portno>] [-l <user>:<pwd>] <command>

The optional arguments <hostname> and <portno> allow accessing the server on a different host on the specified port. If no <hostname> is given the local host is used. If no port number is given the standard port 2267 is used. When login is required credentials can be given with the optional arguments <user> and <pwd>.