Problem Given is 


A CentOS 7 server has Java 7 and tomcat 8 installed. I need to set the permgen space, but typing printenv on the command line does not include JAVA_OPTS in the list of environmental variables. I typed ps to get the list of running processes, and then I typed jmap -heap <pid>with the pid from the running java process, which listed values for MaxPermSize and PermSizeamong other values.
How do I set new values for these properties in a way that will persist when the system is rebooted, etc.? I hesitate to just create a JAVA_OPTS variable if the server in question has another place where it stores these persistent values.

Answer


To can set java option inside tomcat/bin.
To do this you need to create setenv.sh file inside tomcat/bin and put 

JAVA_OPTS="-XX:MaxPermSize=128m"

You can increase it as per your requirement and set other java options also.
In case you want to set Java options in eclipse only you can follow the steps given here.