====== 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: - ''--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. - ''--headless'' this argument start GroIMP headless, i.e. without a graphical interface. Usually you also define the project to open as an argument. - ''-a api'' this argument defines which application will be started (current available application: ''imp'', ''cli'', ''api''). By default GroIMP starts with ''imp''. - ''-p /path/to/a/directory/'' link a directory to the list of loaded plugins. - ''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 [[02_old_tutorials:08_technical_features:xparametric-model|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 ===== {{namespace>01_user_documentation:03_interacting_with_groimp:03_configuring:02_groimp_arg}}