- Click the arrow next to the run button, and select Run Configurations...
- Select your application from the left list
- Go to Arguments
- In VM arguments add
-Xmx6g -Xms2g
- Click Apply.
This will increase the heap size for that launch configuration to 6G.
Вопрос
The issue is that running from cmd is not very good for debugging . I need to debug the code , so is there any way i could increase heap and debug in eclipse .
I tried increasing heap in control panel - > java -> view - > 6g
but still get the java out of memory in eclipse
Нет правильного решения
Другие советы
-Xmx6g -Xms2g
This will increase the heap size for that launch configuration to 6G.
Try changing in the eclipse.ini file. Here is an example configuration
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms512m
-Xmx1024m
-XX:+UseParallelGC
-XX:PermSize=256M
-XX:MaxPermSize=512M
You can change default jvm args which will apply to all Run/Debug configurations and you don't have to change individual configuration.
In eclipse go to Window -> Preference -> Java -> Installed JREs -> Edit default JRE
. There add -XX:MaxPermSize=512m
under Default VM arguments