User Tools

Site Tools


01_user_documentation:03_interacting_with_groimp:03_configuring:02_groimp_arg

GroIMP arguments

GroIMP will can receive and use arguments in the command line. Such arguments can be either used by groimp, or forwarded to the project, and accessible there.

java -jar core.jar –project-tree

The command above can be split in two:

  • the java command and arguments
  • the GroIMP arguments

The additional java arguments are inserted AFTER the -jar core.jar argument.

In the given example, the GroIMP argument is –project-tree.

Most common arguments

A non exhaustive list of common Java arguments used with GroIMP:

  1. –project-tree this argument is used when GroIMP is run in Eclipse, it tells GroIMP to load classes under the local /PLUGIN/target/classes/ repositories where PLUGIN is the name of each directories at the root of GroIMP. This path is different when GroIMP is run after packaging. By default GroIMP load classes in ./plugins/PLUGIN/PLUGIN.jar where PLUGIN is the name of each plugins.
  2. –headless this argument start GroIMP headless, i.e. without a graphical interface. Usually you also define the project to open as an argument.
  3. -a api this argument defines which application will be started (current available application: imp, cli, api). By default GroIMP starts with imp.
  4. -p /path/to/a/directory/ link a directory to the list of loaded plugins.
  5. path/to/a/model.gsz this argument requires to be used last. It gives a model to be opened after start.

Project arguments

It is possible to forward parameters from the command line to the GroIMP simulation using additional parameters beginning with an capital X. so for a variable called number with the value 5 the additional parameter would be -Xnumber=5. This value can than in the simulation be recalled by Main.getProperty(“number”)

A tutorial for this can be found here

Note: if you run GroIMP from Eclipse, the GroIMP arguments can be set in the Run Configuration…>x() = Arguments>Program arguments

Exhaustive list of arguments

a

-a {application} this argument defines which application will be started (current available application: GUI, cli, api). By default GroIMP starts with GUI.

e.g. -a api.

cmd

-- -cmd "/path/to/command" run a specific GroIMP command when starting GroIMP

headless

--headless this argument start GroIMP headless, i.e. without a graphical interface. Usually you also define the project to open as an argument.

' ' model

' ' {path/to/a/model.gsz} this argument requires to be used last. It gives a model to be opened after start. The ' ' represent a white space.

p

-p {/path/to/a/directory/} link a directory to the list of loaded plugins.

P

Parameter value & PM file

project-tree

--project-tree this argument is used when GroIMP is run in Eclipse, it tells GroIMP to load classes under the local /PLUGIN/target/classes/ repositories where PLUGIN is the name of each directories at the root of GroIMP. This path is different when GroIMP is run after packaging. By default GroIMP load classes in ./plugins/PLUGIN/PLUGIN.jar where PLUGIN is the name of each plugins.

t

-t {/path/to/config/file}. It makes GroIMP use the config file as main option.

X

-Xvar=value

01_user_documentation/03_interacting_with_groimp/03_configuring/02_groimp_arg.txt · Last modified: 2025/08/19 15:23 by gaetan