title: How to Set a Custom Garbage Collector Algorithm in Tomcat
body: <p>I want to set a custom garbage collector algorithm for my java application[war] which is running on top of tomcat. I am using java8 and the default garbage collector is parallelGC. I want to use G1GC or CMS GC instead of this.</p>
  
  <pre><code>java -XX:+UseG1GC -jar Application.java
  </code></pre>
  
  <p>A Jar application can be executed with the above command. 
  But I want to know how we can configure this in tomcat/ with a war application?</p>