System Requirements
Before installing L2J Mobius Chronicle 4, ensure your system meets the following requirements:
Hardware Requirements
CPU : Multi-core processor (4+ cores recommended)
RAM : Minimum 4GB (16GB+ recommended for production)
Storage : 10GB+ free disk space
Network : Stable internet connection with static IP (for public servers)
Software Requirements
Java 25 is required for L2J Mobius Chronicle 4. Earlier versions will not work.
Java Development Kit (JDK) 25
Apache Ant 1.8.2+ (for building from source)
MySQL 5.7+ or MariaDB 10.3+
Operating System : Linux (recommended), Windows, or macOS
Installing Java 25
Linux (Ubuntu/Debian)
Windows
macOS
# Download and install OpenJDK 25
wget https://download.oracle.com/java/25/latest/jdk-25_linux-x64_bin.tar.gz
tar -xzf jdk-25_linux-x64_bin.tar.gz
sudo mv jdk-25 /opt/
# Set environment variables
export JAVA_HOME = / opt / jdk-25
export PATH = $JAVA_HOME / bin : $PATH
# Add to .bashrc or .profile for persistence
echo 'export JAVA_HOME=/opt/jdk-25' >> ~/.bashrc
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
# Verify installation
java -version
# Download JDK 25 from Oracle website
# Install the .exe installer
# Set environment variables
setx JAVA_HOME "C:\Program Files\Java\jdk-25"
setx PATH "%JAVA_HOME%\bin;%PATH%"
# Verify installation (open new terminal)
java - version
# Download and install JDK 25
brew install openjdk@25
# Link the installation
sudo ln -sfn /opt/homebrew/opt/openjdk@25/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-25.jdk
# Set environment variables
export JAVA_HOME = / Library / Java / JavaVirtualMachines / openjdk-25 . jdk / Contents / Home
export PATH = $JAVA_HOME / bin : $PATH
# Verify installation
java -version
Installing Apache Ant
sudo apt-get update
sudo apt-get install ant
# Verify installation
ant -version
# Download Apache Ant from https://ant.apache.org/bindownload.cgi
# Extract to C:\ant
# Add to PATH
setx PATH "%PATH%;C:\ant\bin"
# Verify (open new terminal)
ant - version
brew install ant
# Verify installation
ant -version
Build Process
Clone or Download Source
Download the L2J Mobius Chronicle 4 source code to your server: cd /opt
git clone < repository-ur l > l2jmobius-c4
cd l2jmobius-c4
The source directory contains the build.xml file which defines the build process.
Build with Ant
The build process compiles the source code and creates JAR files for the LoginServer, GameServer, and DatabaseInstaller. # Run the build from the source directory
ant
The build process performs the following steps:
Validates Java 25 is installed
Compiles Java source code from java/ directory
Creates JAR files in ../build/dist/libs/:
LoginServer.jar
GameServer.jar
DatabaseInstaller.jar
Packages everything into L2J_Mobius_C4_ScionsOfDestiny.zip
The build.xml file at ~/workspace/source/build.xml:55 explicitly checks for Java 25: < fail unless = "JDK25.present" message = "Java 25 is required..." />
Verify Build Output
After successful build, verify the JAR files were created: ls -lh ../build/dist/libs/
You should see: GameServer.jar
LoginServer.jar
../build/dist/db_installer/DatabaseInstaller.jar
Deploy Distribution Files
The compiled server is ready in the dist/ directory: # Distribution structure
dist/
├── game/ # GameServer files
├── login/ # LoginServer files
├── db_installer/ # Database installation tool
├── libs/ # Required JAR libraries
└── backup/ # Database backups location
Copy or extract the distribution to your deployment location: # Option 1: Use the existing dist folder
cd dist
# Option 2: Extract the built zip
unzip ../build/L2J_Mobius_C4_ScionsOfDestiny.zip -d /opt/l2j-server
cd /opt/l2j-server
Directory Structure
After installation, your server directory structure will be:
l2j-server/
├── game/
│ ├── config/ # GameServer configuration files
│ ├── data/ # Game data (XML files)
│ ├── log/ # Server logs
│ ├── GameServer.sh # Linux startup script
│ ├── GameServerTask.sh
│ └── java.cfg # JVM settings
├── login/
│ ├── config/ # LoginServer configuration files
│ ├── log/ # Login server logs
│ ├── LoginServer.sh # Linux startup script
│ ├── LoginServerTask.sh
│ ├── GameServerRegister.sh
│ └── java.cfg # JVM settings
├── db_installer/
│ ├── sql/ # Database schemas
│ └── DatabaseInstaller.sh
├── libs/ # JAR libraries
└── backup/ # Database backup storage
JVM Configuration
The server uses configuration files to set JVM parameters:
game/java.cfg
login/java.cfg
-server -Dfile.encoding=UTF-8
-Djava.util.logging.manager =org.l2jmobius.log.ServerLogManager
-Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari =warn
-XX:+UseZGC
-Xmx32g # Maximum heap: 32GB (adjust for your system)
-Xms16g # Initial heap: 16GB
Adjust -Xmx and -Xms values based on your available system RAM. The GameServer requires significantly more memory than the LoginServer.
Next Steps
After successful installation:
Set up the database
Configure the LoginServer
Configure the GameServer
Review configuration files