본문 바로가기

IT/Java

java.lang.OutOfMemoryError 에러 잡기, 메모리 늘리기

총 2가지 작업을 할 수 있는데..

(1) eclipse.ini 파일에서 아래 색칠된 부분 값 변경하기. 2의 배수로만 지정할 수 있음


-startup

C:\app\eclipse_fta\plugins\org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar

--launcher.library

C:\app\eclipse_fta\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20140116-2212

-product

org.eclipse.epp.package.jee.product

--launcher.defaultAction

openFile

--launcher.XXMaxPermSize

256M

-showsplash

org.eclipse.platform

--launcher.XXMaxPermSize

256m

--launcher.defaultAction

openFile

--launcher.appendVmargs

-vm

C:\Program Files\Java\jdk1.7.0_80\bin\javaw.exe

-vmargs

-Dosgi.requiredJavaVersion=1.6

-Xms512m            최소메모리

-Xmx1024m         최대메모리




(2) eclipse의 Window -> preferences -> Java -> Installed JREs -> 체크되어있는 jdk를 선택하고 Edit 버튼 클릭

 밑에서 Default VM arguments 에 아래와 같은 내용 입력하기