[Solved]GS build : OutOfMemoryError

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Ghurdyl
Posts: 55
Joined: Tue Jun 03, 2008 4:52 pm
Location: Hannut, Belgium

[Solved]GS build : OutOfMemoryError

Post 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
~Ghurdyl~
"If you give a man a fire, he'll be warm for a day. If you set a man on fire, he'll be warm for the rest of his life" :)
User avatar
Aikimaniac
L2j Inner Circle
L2j Inner Circle
Posts: 3048
Joined: Sun Aug 07, 2005 11:42 pm
Location: Slovakia

Re: [Solved]GS build : OutOfMemoryError

Post 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
Image
User avatar
nonom
L2j Veteran
L2j Veteran
Posts: 649
Joined: Wed Mar 11, 2009 10:34 pm
Location: Magmeld

Re: [Solved]GS build : OutOfMemoryError

Post 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"
Image
"There are three kinds of people in this world, those who can count and those who can't"
Ghurdyl
Posts: 55
Joined: Tue Jun 03, 2008 4:52 pm
Location: Hannut, Belgium

Re: [Solved]GS build : OutOfMemoryError

Post 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
~Ghurdyl~
"If you give a man a fire, he'll be warm for a day. If you set a man on fire, he'll be warm for the rest of his life" :)
Post Reply