문제

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

올바른 솔루션이 없습니다

다른 팁

  1. Click the arrow next to the run button, and select Run Configurations...
  2. Select your application from the left list
  3. Go to Arguments
  4. In VM arguments add -Xmx6g -Xms2g
  5. Click Apply.

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top