I have noticed that Mathematica makes use of Java by way of JLink, for example, in the extensions such as DatabaseLink and (I think) RLink. It also seems like Java is a first-class citizen for writing our own extensions.
An issue that I almost always run in to is that my data sets are too large for the default Java heap size (-Xmx). Almost all of my notebooks have ReinstallJava
at the top, where the maximum Java memory is set to some large fraction of the 256 gigabytes of RAM in my computer. On computers of this size, the default Java setting seems like the 640K memory limit (who could need more than that?)
Sometimes, it seems hard to figure out how to set the Java memory for certain packages (e.g. in RLink, apologies, this could be made into a separate question for that.)
My question: is there a place where I can "hard-wire" the maximum Java memory for a given computer so that I don't need the boiler plate code?
InstallR[]
. You can use it not just to specify the location of your JRE, but also to enter command-line parameters, in particular those that govern the memory usage limits for JVM. $\endgroup$