-
I have looked in the documentation, jbang --help, and searched a bit on the internet, but could not find out if JBang offered a nice and easy way to specify JVM memory settings when running a script. At Apache Camel we love JBang and are using it for Camel CLI and a new way to use Camel. In the Camel CLI we made a command to output status of the running Camel integrations and one shows some memory and other status, eg as shown below:
The heap stats are: used/committed/max I wonder if there is a way to set the min/max size ala |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @davsclaus , yes you can set compile and runtime option sin the script using And you can also use the command line flag |
Beta Was this translation helpful? Give feedback.
-
Thanks for the pointers, this is how you can do it
Setting heap sizes is more common to do, but can be a bit tricky to do. |
Beta Was this translation helpful? Give feedback.
-
Also the camel --java-options=-Xmx300m run bar.yaml I don't think I have been able to add jbang run --debug camel@apache/camel run bar.yaml |
Beta Was this translation helpful? Give feedback.
Hi @davsclaus , yes you can set compile and runtime option sin the script using
//JAVAC_OPTIONS
and//JAVA_OPTIONS
, see https://www.jbang.dev/documentation/guide/latest/running.html#java-and-javac-optionsAnd you can also use the command line flag
--java-options
for passing runtime options.