On Serv00.com servers Java is available as
Changing Java version
For changing the Java version from the
default 1.8 under the
java command, set the variable corresponding to the given version:
export JAVA_VERSION="8" export JAVA_VERSION="11" export JAVA_VERSION="12" export JAVA_VERSION="13" export JAVA_VERSION="14" export JAVA_VERSION="15" export JAVA_VERSION="16" export JAVA_VERSION="17" export JAVA_VERSION="18" export JAVA_VERSION="19"
The following commands are also available:
To limit the RAM available for a
java process run it with an option
<memory> is the amount of memory, for example:
Additionally, you can use
-XX:MaxMetaspaceSize=<memory> to set
Permanent Generation - the place where class files that are the result of compiled classes and jsp pages are stored. When the maximum space is reached, the Java Virtual Machine starts
Full Garbage Collection. When
Full Garbage Collection after clearing old classes without references still won't have space for newly generated ones then the Java Virtual Machine shuts down with
Out-of-Memory Error (OOME) error.
You can also use the
-Xss<memory> parameter to set the stack size for each Java thread. In such a stack are kept: addresses to the memory of objects returned by the function, arguments to the function etc.