Using JVM options
When using the Java interface, you can instruct fglrun or fglcomp to pass Java VM specific options during JNI initialization, by
using the --java-option command line argument.
In the example, fglrun passes
-verbose:gc to the Java Virtual
Machine:$ fglrun --java-option=-verbose:gc myprog.42mIf you want to pass several options to the JVM, repeat the
--java-option
argument as in this
example:$ fglrun --java-option=-verbose:gc --java-option=-esa myprog.42mYou may want to pass the Java class path as a command line option to fglrun
with
-Djava.class.path option as in this
example:$ fglrun --java-option=-Djava.class.path=$FGLDIR/lib/fgl.jar:$MYCLASSPATH
myprog.42mRegarding class path specification, the java runtime or javac
compiler provides the -cp or -classpath options but when loading
the JVM library from fglrun or fglcomp, only
-Djava.class.path option is supported by the JNI interface.
Alternatively, you can define JVM options with the JAVA_TOOL_OPTIONS environment
variable:
$ export JAVA_TOOL_OPTIONS="-Xmx5G"
$ fglrun myprog.42mHowever, this solution can have some limitations. For more details, see the Java documentation.