Page 1 of 1

[Solved]GS build : OutOfMemoryError

Posted: Fri Dec 25, 2009 1:23 pm
by Ghurdyl
Hello,

This morning I did the upgrade from Gracia final to Epilogue.

I had trouble to build my GS as my JVM lacked of memory.
stack trace wrote: [javac] Compiling 2779 source files to L2_GameServer\build\classes
[javac] The system is out of resources.
[javac] Consult the following stack trace for details.
[javac] java.lang.OutOfMemoryError: Java heap space
For the people who have the same issue and don't know how to solve here's what I did :
- go in Window -> Prefences -> Java -> Installed JREs
- there you should have a JDK 6 checked in the list.
- select it and click "Edit ..."
- in the field "Default VM arguments" write : -Xmx256m

By default max memory was 64Mo and it was to short.

My config :
Eclipse : Gallileo 3.5.1
gameserver verion : 3652
JDK 6 update 17

Re: [Solved]GS build : OutOfMemoryError

Posted: Fri Dec 25, 2009 2:00 pm
by Aikimaniac
i use this in eclipse.ini and works fine

Code: Select all

-startupplugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar--launcher.libraryplugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731-showsplashorg.eclipse.platform--launcher.XXMaxPermSize256m-vmargs-Xms40m-Xmx1024m

Re: [Solved]GS build : OutOfMemoryError

Posted: Fri Dec 25, 2009 5:13 pm
by nonom
Another way, adding some attributes to build.xml under javac task

Code: Select all

 	<target name="compile" depends="version" description="Compile the source.">-		<javac destdir="${build.classes}" optimize="on" debug="on" source="1.6" target="1.6" nowarn="off">+		<javac destdir="${build.classes}" optimize="on" debug="on" source="1.6" target="1.6" [color=#00BF00]fork="true" memoryinitialsize="256m" memorymaximumsize="256m"[/color] nowarn="off"> 			<src path="${src}" /> 			<classpath refid="classpath" /> 		</javac>
NOTE: fork attribute needs be "true"

Re: [Solved]GS build : OutOfMemoryError

Posted: Sat Dec 26, 2009 2:47 pm
by Ghurdyl
I found out why I needed to increase max memory size.

net.sf.l2j. have been replaced by com.l2jserver.

I did not pay attention at the beginning but I had all the packages twice ...
and then it tried to build everything, including the old named packages.

Now I have removed them I don't need the "-Xmx256m" anymore