how to set java_opts in eclipse
eclipse, java
Solution
In eclipse go to your launch configuration of the server (something like `Apache Tomcat > Tomcat v7.0 Server at localhost`) and add jvm arguments in the `Arguments` tab in the `VM arguments` field.
If you are using eclipsetotale tomcat plugin then go to
Preferences > Tomcat > JVM Settings > Append to JVM Paramaters
and add them one by one.
EDIT (run as > run on server)
Problem
I need to set `JAVA_OPTS` in a development machine running windows 7 home edition and `tomcat 7 server`. I am getting `permgen out of memory` error when running `spring-mvc` web applications from `eclipse`. I want to enable `class` unloading so that memory gets freed up over the course of repeated reloading of web applications. I also want to increase the amount of memory available. Can someone show me explicitly how to do this, in step by step form? Do I set a windows system environmental variable? Do I run something from the command line? What specifically will my commands look like in code? Here is what I have so far (all on the same line): ``` JAVA_OPTS=XX:MaxPermSize=128MXX:+CMSClassUnloadingEnabledXX:+CMSPermGenSweepingEnabledXms256m -Xmx512m ```