# Setting the JVM Heap and other parameters¶

Java allows you to configure the maximum heap size and various other settings with command line parameters when the JVM is started. BeakerX allows you to add parameters to the JVM with environment variables. For example, before you start Juptyer run

export beakerx_groovy_java_arg=-Xmx6g

And then when the Groovy kernel is started, it will have a 6GB maximum heap instead of the default. For an other JVM language, just substitute its name for "groovy". If you want to add more than one argument, then give the extras numbers, like beakerx_groovy_java_arg2=-Dmyproperty=100.

In [1]:
Runtime.getRuntime().maxMemory()/1e9

Out[1]:
5.726797824
In [2]:
System.getProperty("myproperty")

Out[2]:
100