Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting memory of Java programs that runs from Eclipse

Tags:

I'm running a Java application from Eclipse that need a lot of memory.

Where can i put the -Xmms-xms flag ?

like image 640
Guillaume Massé Avatar asked Nov 13 '10 23:11

Guillaume Massé


People also ask

How do I allocate more memory to Eclipse?

Since Eclipse is a Java program, you can increase the heap size of Eclipse by using JVM memory options -Xms and -Xmx. There are two ways to provide JVM options to eclipse either updating the Eclipse shortcut or adding -vmargs on eclipse. ini file.

How do I change JVM settings in Eclipse?

-- 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.

Where is XMS and XMX set in Eclipse?

In the left pane of Run Configurations window, navigate to the Java Application node and select the Java application for which you need to increase the heap size. Then in the right pane, click on the Arguments tab. -Xmx[CUSTOM_SIZE] – This means that your JVM will be able to use a maximum of Xmx amount of memory.


1 Answers

You can set the VM arguments for a specific run configuration:

Run → Run Configurations... → Arguments Tab → VM arguments

Btw, you may want to try -Xms instead of -Xmms.

like image 122
aioobe Avatar answered Sep 18 '22 14:09

aioobe