Java Options and Arguments
This guide has been reviewed and reformatted for Ruk-Com Cloud PaaS. Screens may vary slightly by platform version.
Click or tap a screenshot to view it at its original size.
Objective
This guide explains how to use Java Options and Arguments on Ruk-Com Cloud PaaS, with ordered procedures and practical verification points.
Before you begin
- Sign in with an account permitted to manage the relevant environment.
- Confirm the target environment, region and resources before saving changes.
- Create a backup or rollback plan before changing a production system.
To ensure cost efficiency, all Java servers managed by Ruk-Com Cloud are automatically configured to use memory.memoryThe most useful way is to adjust Java memory parameters based on the amount of resources allocated to the container.
Instructions:Unmanaged Java containers can improve performance by adding the Java Memory Agent.
In addition, for higher efficiency or other manual configuration. Auto options can be changed.
1. To provide all required Java options at once one can use the file variables.conf
The exact location may vary depending on the specific server application you are using:
- Tomcat,TomEE-/opt/tomcat/conf/variables.conf
- Jetty-/opt/jetty/etc/variables.conf
- Spring Boot-/opt/shared/conf/variables.conf
- GlassFish-/opt/glassfish/glassfish/domains/domain1/config/variables.conf
- Payara-/opt/payara/glassfish/domains/domain1/config/variables.conf
- WildFly-/opt/wildfly/conf/variables.conf

If necessary, you canSet new main memory options.You can do this by using container variables.
2. Don't forget to restart node to apply changes.

That's it, the application is now running with your customized Java options.
Redefining Main Java Parameters
The most important memory parameters (-Xms, -Xmn, -Xmx, -Xminf, -Xmaxf, -XX:MaxPermSize, *-XX:+Use.GC) can be reassigned using specific environment variables.
For example, you can increase Xmx options (such as maximum size for Java heap memory) by clicking the button.Add:

Spring Boot and Java Engine Specific Variables
When using a templateSpring BootandJava EngineYou can provide 2 additional variables:
- JAVA_OPTS- Used to customize Java options for your app. (similar to file variable.conf)
- JAVA_ARGS- Used to pass custom arguments to your main application.

Don't forget to restart your application server to apply the changes.