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
-- Go to the Eclipse Window > preferences, in "Java > Installed JREs". -- Copy the current default JRE with a new name, for example myJRE. -- Select the new JRE and click on the "Edit" button. -- In the "Edit JRE" dialog, add your JVM arguments in the "Default VM Arguments" field.
JAVA_OPTS is an environment variable that you can set to pass custom settings to the Java Virtual Machine (JVM) that runs Liquibase.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With