Jenkins uses the default virtual machine settings if you started Jenkins through java -jar jenkins.war, otherwise, if you started jenkins through Tomcat, etc., by default they go through Tomcat (Jetty or something else). In tomcat, you can set JAVA_OPTS before Tomcat begins to detect such things.
In addition, settings for Maven can be controlled by the MAVEN_OPTS environment variable, which can be set for each build in Jenkins. View the Job configuration for your job. Reasonable values ββfor such an installation depend on what your build is doing, which I don't know about.
source share