Private
Protection
Special Offers
Catalog
Auto donation
How to open a Lineage 2 Java server pack in a modern IDE, set up the JDK, build the project and track your changes in Git: cloning, branches, commits and syncing.
Old guides told you to install Eclipse Classic with the Subclipse and m2eclipse plugins and keep the code in SVN. Today everything you need is built into modern IDEs, and Git is the standard for version control. Below is an up-to-date workflow for L2J-family server packs and their derivatives.
| Component | What to install | Purpose |
|---|---|---|
| JDK | 17 or 21 (LTS), 64-bit; check your pack's requirements for the exact version | compiling and running the server |
| IDE | IntelliJ IDEA Community or Eclipse IDE for Java Developers | editing, code navigation, building, debugging |
| Git | current version | change history, branches, sharing code with your team |
| Build tool | Maven, ANT or Gradle; usually already built into the IDE | building the server jar/zip |
pom.xml look for maven.compiler.release (or source/target), in build.xml for the release, source and target attributes of the javac task, in build.gradle for the toolchain or sourceCompatibility. Current packs need Java 17 or 21. Very old chronicles may only build on Java 8; in that case install the version the project requires.The sources of an L2J-style pack are either one repository with several modules or several separate repositories:
lib/ folder with third-party libraries;pom.xml (Maven), build.xml (ANT) or build.gradle (Gradle).java -version and javac -version. Setting JAVA_HOME is covered in the Windows setup guide.git config --global user.name "Your Name"
git config --global user.email you@example.com
git config --global init.defaultBranch main/bin/bash^M: bad interpreter error), add a .gitattributes file to the repository root:* text=auto
*.sh text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.jar binary
*.zip binaryThe pack developer gives you the repository address (HTTPS or SSH). Clone it into a working folder, preferably one whose path has no spaces or non-Latin characters:
cd D:\work
git clone REPOSITORY_URL l2-server
cd l2-server
git statusFor a private repository an SSH key is the most convenient option: create one with the command below and add the contents of the .pub file to your account settings on the Git server. Your account password usually does not work for Git operations, so use a key or an access token.
ssh-keygen -t ed25519 -C "you@example.com"
cat ~/.ssh/id_ed25519.pubYou can also clone straight from the IDE: in IntelliJ IDEA use File > New > Project from Version Control, in Eclipse File > Import > Git > Projects from Git.
pom.xml, build.gradle or build.xml). Maven and Gradle projects are imported automatically: wait until the IDE downloads the dependencies and indexes the code (progress bar at the bottom).lib/ as a library (Libraries > + > Java). Add build.xml itself to the Ant tool window with the + button.build.xml > Run As > Ant Build... and pick the target you need.Building is covered in detail in separate guides: Maven and ANT (build.xml). In short:
clean, then package; the output goes to target/.build; the output goes to build/libs/ or build/distributions/.dist target (or whatever the main target is called); the output usually goes to build/.To run and debug the server from the IDE, create an Application run configuration: the server's main class (for example, your pack's GameServer class), the working directory set to the built server folder that contains config/, and memory settings in VM options (-Xms, -Xmx). With a wrong working directory the server will not find its configs.
A server running on another machine can be debugged remotely: add the option below to its startup script and connect from the IDE with a Remote JVM Debug configuration on port 5005.
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005| Command | What it does |
|---|---|
git status | shows changed and new files |
git pull | fetches and merges changes from the remote repository |
git switch -c fix/olympiad | creates a branch and switches to it |
git add file, git add -A | stages changes for a commit |
git commit -m "message" | records the staged changes with a message |
git push -u origin fix/olympiad | sends the branch to the server |
git log --oneline | compact commit history |
git diff | shows changes that are not committed yet |
git stash | temporarily shelves uncommitted changes |
A typical cycle is one branch per task:
git switch main
git pull
git switch -c fix/olympiad-points
# edit the code, build, test on a test server
git add -A
git commit -m "Olympiad: fix points calculation"
git push -u origin fix/olympiad-points
# then merge the branch into main (merge request or git merge)The main branch may be called main or master; git branch -a lists all branches. The same actions are available in the IDE: in IntelliJ IDEA use Commit (Ctrl+K), Update Project (Ctrl+T) and Push (Ctrl+Shift+K); in Eclipse use the Team menu and the Git Staging view.
git pull. If Git reports a conflict, open the conflicting files in the IDE (Git > Resolve Conflicts in IntelliJ IDEA), choose the right lines and finish the merge with a commit.Build output, IDE settings, logs and passwords do not belong in the repository. Create a .gitignore file in the project root:
# Build output
target/
build/
out/
*.class
# IDE files
.idea/
*.iml
.classpath
.project
.settings/
# Server logs and runtime files
log/
logs/
*.logbuild/, dist/ or bin/ folder is part of the sources (it holds configs and startup scripts). Ignore only what the build generates. If build output has already been committed, remove it from the index with git rm -r --cached target and commit.Never commit real database passwords or keys: keep a sample config in the repository and the working file with passwords only on the server.
SVN (Subversion) used to be the standard for L2 packs, and some old projects still live there. The basic commands are svn checkout to get a working copy, svn update to update it and svn commit to send changes. It is easier to move the history to Git once; for the standard trunk/branches/tags layout:
git svn clone SVN_URL --stdlayout l2-server| Problem | Solution |
|---|---|
| All code is red, Cannot resolve symbol | no JDK selected or dependencies not loaded: Project Structure > SDK, then Reload in the Maven or Gradle tool window |
release version 21 not supported | the IDE or build tool runs on an older JDK: select JDK 21 in the project and Maven/Gradle/Ant settings |
| Garbage instead of Russian text | wrong file encoding in the IDE settings or in pom.xml/build.xml |
Permission denied (publickey) on clone or push | the SSH key is not added to your account or Git is using a different key |
Conflict on git pull | resolve the conflict in the IDE, then git add and git commit |
/bin/bash^M: bad interpreter on Linux | the script has CRLF line endings: set up .gitattributes and resave the file with LF endings |
Looking for a pack with source code or help setting up your environment? See our server packs and turnkey projects. More material is in the articles list.
Published 30 October 2026
We help with the server pack, setup, protection and launch — one-off or on an ongoing basis.
Get L2‑Scripts news by email
And 5% off all studio services while you stay subscribed.
The discount is valid while you are subscribed: when ordering, tell the manager your subscription address on Telegram.
Search
News