How to set java_opts in eclipse

I need to install JAVA_OPTS on a development machine running on Windows 7 home edition and tomcat 7 server . I get permgen out of memory error when running spring-mvc web applications from eclipse . I want to enable class unloading in order to free memory when reloading web applications. I also want to increase the amount of available memory.

Can someone explicitly show me how to do this, step by step?

Set Windows environment variable? Run something from the command line? What exactly will my teams look like in code?

Here is what I still have (all on one line):

 JAVA_OPTS=XX:MaxPermSize=128MXX:+CMSClassUnloadingEnabledXX:+CMSPermGenSweepingEnabledXms256m -Xmx512m 
+6
source share
1 answer

In eclipse, go to the server startup configuration (something like Apache Tomcat > Tomcat v7.0 Server at localhost ) and add the jvm arguments in the Arguments tab in the VM arguments field.

If you are using the eclipsetotale tomcat plugin, go to

 Preferences > Tomcat > JVM Settings > Append to JVM Paramaters 

and add them one by one.

EDIT (run as> run on server)

enter image description here

+13
source

Source: https://habr.com/ru/post/958961/


All Articles