Jump to content
  • 0

how to increase java heap size


Question

10 answers to this question

Recommended Posts

  • 0
Posted

can anyone explain how to increase java heap size? i've read topics here but noone had written this.

Where did u read topics?In this section?

 

There are more than 100 topics about this @ dev help

  • 0
Posted

Where did u read topics?In this section?

 

There are more than 100 topics about this @ dev help

 

Yea there are guides everywhere reguarding this.

 

Open up gameserver.bat and look at the line that says:

java -Xmx512m -cp ./libs/*; net.sf.l2j.gameserver.GameServer

 

Replace it with something like this:

java -server -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts -cp ./libs/*; net.sf.l2j.gameserver.GameServer

 

;)

  • 0
Posted

i have 8 GB of RAM and when i write java -Xmx2024m -Xms2024m -cp  in gameserver.bat and start the server, the gameserver writes Error occurred during initialization of VM

The size of the object heap + VM data exceeds the maximum representable size

  • 0
Posted

i have 8 GB of RAM and when i write java -Xmx2024m -Xms2024m -cp  in gameserver.bat and start the server, the gameserver writes Error occurred during initialization of VM

The size of the object heap + VM data exceeds the maximum representable size

 

i wrote that and it said this:

 

 

Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine.

 

  • 0
Posted

i wrote that and it said this:

 

 

Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine.

 

 

You are probably using 32bit Java and if will not go over 1520mb, for anything higher you have to run 64bit java.

  • 0
Posted

i wrote that and it said this:

 

 

Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine.

 

 

Try java -Xmx2024m -Xms1536m      Little tip always have Xms set to a smaller number than Xmx. Also make sure you make it smaller in increments like 256, 512,1024  see where I'm going with that? :)

  • 0
Posted

You are probably using 32bit Java and if will not go over 1520mb, for anything higher you have to run 64bit java.

 

thanks a lot i have solved the problem using java 64 bit

  • 0
Posted

Try java -Xmx2024m -Xms1536m      Little tip always have Xms set to a smaller number than Xmx. Also make sure you make it smaller in increments like 256, 512,1024  see where I'm going with that? :)

 

actually until its not bigger doesnt matter and it has no effect at all having xms at the same value xms is by far more than enough

Guest
This topic is now closed to further replies.


  • Posts

    • Hello everyone, I am selling the complete AdvExt64 FULL Extender for L2OFF PTS Interlude servers, including the complete source code.   Note: This is NOT the Vanganth extender. This is the complete, fully featured Interlude advext64 extender its full source code. Here is a breakdown of the key features included in this extender:   💻 Source Code Included   Full Extender Source: Modify, compile, and add your own custom features with zero limitations   ⚔️[NEW] Boss Spawns & Global Announcements   Boss Management (BossSpawn.txt): Full control over the exact spawn coordinates and respawn times for any Raid or Epic Boss. Auto-Announce: The server will automatically send a global announcement whenever a normal Raid Boss or Epic Boss spawns (supports custom chat colors). 🏪 Exclusive Systems (OtherSettings) [SearchStore] Costume system; Skins Clan Crest on NPCs:   🌟 Core Systems & Quality of Life AIO (All-In-One) System Premium & VIP System Offline Trade & Market Custom NPC Buffer Extended Teleports Buff Store System: Buff Item Fast Load L2Npc Multi-language System   ⚔️ [NEW] Event Engine (Fully Automated) Good vs Evil (GVE) & All vs All (AVA): Team vs Team (TvT) Capture the Flag (CTF): Last Hero (DeathMatch) Party Death "Server First" Promos: Custom Drop Events Vip System Newbie Rates: ⚙️ Custom Gameplay Mechanics Daily/Weekly/Monthly Missions: Advanced Enchant System: Attribute System Special Map Areas: Olympiad Extras: PvP/PK Systems: In-Game Mail Clan Search Seach Store Bot Report   🛡️ Security & Administration Anti-Bot Integrations:  Patch & HWID Protection: Builder System Jail & Chat Filter System   Price: 500 USD Contact Telegram: @TrakinasXP      
    • [SIZE=4][B]🇨🇦 NEWCANADA40 — 40% OFF VPS in Canada (Toronto)[/B][/SIZE] We are excited to announce the launch of our new location — Toronto, Canada. [B]Promo code:[/B] NEWCANADA40 [B]Discount:[/B] 40% on VPS orders [B]Valid until:[/B] June 7 ✔ New Canadian location ✔ Excellent North American connectivity ✔ Fast server deployment ✔ Suitable for any project [B]How to activate:[/B] — Visit our website — Select Canada (Toronto) as your location — Enter the promo code during checkout 👉 [url=https://bit.hosting]https://bit.hosting[/url] [I]The offer is valid for new Toronto VPS orders until June 7, 2026.</I>
    • Thanks for the collection and the free advertising! These files have been in the public domain for a long time — you just saved people the trouble of searching. A true fan. 😄 Just to clarify for everyone reading: these files have nothing to do with this topic. They are 10+ year old builds, and since various third-party modifications exist in the wild, we cannot guarantee what may have been added or changed in those versions. Use them at your own risk. We have absolutely no judgment toward those who are on a tight budget and can't afford our current builds — these old shared files might genuinely help you get started. Just use them carefully and at your own risk. And please don't judge developers for the mistakes they made early in their careers — every developer goes through stages of growth, and what you see in those old builds is simply a snapshot of where we were back then. We've come a long way since. If you're interested in our older builds, we have a dedicated thread for that with significantly reduced prices — very accessible for any budget. We have also recently resumed full technical support for legacy builds, handled by a separate team that doesn't interfere with our private development direction for larger projects. You can find our legacy builds here: Our OLd L2-scripts Packs Actual revisions Our current private sources are a completely different story — which is exactly what this thread is about. Too bad all your time goes into collecting other people's old code instead of developing your own project. Though judging by "L2MID is currently offline, we will come back soon in 2026" — you clearly have plenty of time on your hands. 😉
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..