User Tools

Site Tools


user-guide:advanced-groimp-arguments

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
user-guide:advanced-groimp-arguments [2024/07/05 15:13] gaetanuser-guide:advanced-groimp-arguments [2025/05/24 23:11] (current) barley1965
Line 7: Line 7:
 > java -Xverify:none -jar core.jar --project-tree > java -Xverify:none -jar core.jar --project-tree
  
-The command above can be splitted in two:+The command above can be split in two:
   - the java command and arguments   - the java command and arguments
   - the GroIMP arguments   - the GroIMP arguments
Line 15: Line 15:
 In the given example, the java command is ''java -Xverify:none -jar core.jar''. In the given example, the java command is ''java -Xverify:none -jar core.jar''.
  
-There is two java arguments:  +There are two java arguments:  
-  - ''-Xverify:none'', this argument is required in versions of GroIMP > 1.6. But not for java >=17. +  - ''-Xverify:none'', this argument is required in versions of GroIMP > 1.6, but not for Java >=17. 
-  - ''-jar core.jar'', this argument point at the jar file that contains the Main GroIMP classes. Note that depending on how GroIMP is packaged, the name of the .jar file can change. This argument is **always** the last java argument of the command line.+  - ''-jar core.jar'', this argument points at the jar file that contains the Main GroIMP classes. Note that depending on how GroIMP is packaged, the name of the .jar file can change. This argument is **always** the last java argument of the command line.
  
 Java arguments MUST be given before the argument `-jar core.jar`. All arguments given after are pushed to GroIMP and not to the JVM. Java arguments MUST be given before the argument `-jar core.jar`. All arguments given after are pushed to GroIMP and not to the JVM.
Line 23: Line 23:
 A non exhaustive list of common Java arguments used with GroIMP: A non exhaustive list of common Java arguments used with GroIMP:
   - ''-Xverify:none'' required for java >1.6 & <17.   - ''-Xverify:none'' required for java >1.6 & <17.
-  - ''-Xmx3000m'' set the maximum heap size the JVM have access (here to 3GB). If your projects fail at runtime due to memory issues, you probably want to increase this value. +  - ''-Xmx3000m'' sets the maximum heap size the JVM have access (here to 3GB). If your projects fail at runtime due to memory issues, you probably want to increase this value. 
-  - ''-Xss1m'' set threads stack size limit. Some GroIMP model can require a lot of memory for compilation (when you save or open a model). If your project fails at compilation due to memory issues, you probably need to increase this value. Be careful however, the memory allocated due to this argument is pushed to **all** thread created by GroIMP. Thus, in can lead to huge memory consuption.+  - ''-Xss1m'' set threads stack size limit. Some GroIMP models may require a lot of memory for compilation (when you save or open a model). If your project fails at compilation due to memory issues, you probably need to increase this value. Be carefulhowever, the memory allocated due to this argument is pushed to **all** threads created by GroIMP. Thus, it can lead to huge memory consumption.
  
 **Note: if you run GroIMP from Eclipse, the java arguments can be set in the Run Configuration...>x() = Arguments>JVM arguments** **Note: if you run GroIMP from Eclipse, the java arguments can be set in the Run Configuration...>x() = Arguments>JVM arguments**
Line 35: Line 35:
  
 A non exhaustive list of common Java arguments used with GroIMP: 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+  - ''--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 directory at the root of GroIMP. This path is different when GroIMP is run after packaging. By default GroIMP loads classes in ./plugins/PLUGIN/PLUGIN.jar where PLUGIN is the name of each plugin
-  - ''--headless'' this argument start GroIMP headless, i.e. without a graphical interface. Usually you also define the project to open as an argument (see 4.). +  - ''--headless'' this argument starts GroIMP headless, i.e. without a graphical interface. Usuallyyou also define the project to open as an argument (see 4.). 
-  - ''-a api'' this argument defines which application will be started (current available application: ''imp'', ''cli'', ''api''). By default GroIMP starts with ''imp''+  - ''-a api'' this argument defines which application will be started (currently available applications: ''imp'', ''cli'', ''api''). By default GroIMP starts with ''imp''
-  - ''-p /path/to/a/directory/'' link a directory to the list of loaded plugins. +  - ''-p /path/to/a/directory/'' links 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.   - ''path/to/a/model.gsz'' this argument **requires** to be used last. It gives a model to be opened after start.
  
Line 48: Line 48:
  
 It is possible to forward parameters from the command line to the GroIMP simulation using additional parameters beginning with an capital X. 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")'' +For example, for a variable called number with the value 5 the additional parameter would be ''-Xnumber=5''. This value can then in the simulation be recalled by ''Main.getProperty("number")'' 
  
 A tutorial for this can be found [[:Tutorials:xparametric-model|here]] A tutorial for this can be found [[:Tutorials:xparametric-model|here]]
user-guide/advanced-groimp-arguments.txt · Last modified: 2025/05/24 23:11 by barley1965