So, ever since the github page got a DMCA request and was taken down all of the L2J stuff was moved to bitbucket, and subsequently the fully compiled versions of L2J Server and DataPack are no longer uploaded anywhere. Following the guide on how to compile these on the main L2J Page is currently outdated (as of 2-22-17) so I thought I would provide a new tutorial for those looking to get their hands on the bits.
If someone on the Dev team likes, I'd be happy to upload the datapack/server bits compiled somewhere for them - but I'm going to assume there is a good reason they have not done this themselves as I know they easily could.
I'm not a Java developer, so this may not be the "best" way to do this. But it's functional.
Last Updated: 2/22/17
1) First, we need to download the Java Development Kit (JDK). The version suggested by L2J seems to be 8. You can grab it here: http://www.oracle.com/technetwork/java/ ... 33151.html
Make sure you select "Accept Licence Agreement" and click on the download link for your platform. For this, I'm going to assume you're using 64bit Windows.
Install the program, the defaults should be fine.
Restart your computer. This makes sure any java environment variables are fully setup in your system. Don't worry if you don't know what this is - just please RESTART your computer after installing.
2) Next, you want to install Eclipse Neon. You can find the download link here: https://www.eclipse.org/downloads/
Click on "Download 64 BIT" and the "Download" on the following page.
Install the program, again, the defaults should be fine.
3) Now you can go ahead and open up Eclipse.
Exit out of the "Welcome" window.
Go to Window -> Show View -> Other and Select Git -> Git Repositories
In the window that has now been added to your workspace, select "Clone a Git Repository"
Now, we're going to start with importing the L2J Server Repository. You can find the URI for the repository by going to https://bitbucket.org/l2jserver/l2j_server and clicking on "Clone".
For now, the URI is: https://bitbucket.org/l2jserver/l2j_server.git - Paste that into eclipse (some other fields should auto-fill) and hit "Next".
In the Branch Selection window, click "deselect all" and then just check the version you're looking for. For this tutorial, we'll do High Five, which is the "master" branch. Then hit next.
Check the box "Import all existing Eclipse projects after clone finishes" and click finish. Also, make note of the directory the repository is going to be saved in. We'll need that later.
This might take a few minutes to clone, be patient.
Once it's done, you should now have the repository in your "Git Repositories" window.
Now, if you don't currently have the "Package Explorer" Pane open, you can open it by going to Window -> Show View -> Package Explorer
Right click in the "Package Explorer" pane and select "import".
Select Gradle -> Gradle Project and click Next.
On the Welcome Page, click Next.
In the "Project Root Directory" Browse to the top most portion of the git repository we downloaded. This was directory I asked you to make note of earlier. Click OK.
Then Click "Finish". Wait for it to synchronize the workspace.
4) Now, in the bottom your screen you should see a pane called "Gradle Tasks". If you don't see this, you can open it by going to Window -> Show View -> Other and selecting Grade -> Gradle Tasks.
Expand l2j_server -> Build. Right click on "build" and select "run gradle tasks".
Let the process finish completely. A window should pop up with progress, but if it does not you can see it in the bottom right of the screen.
Once this is done, you can find the compiled files in a "build\distributions" folder in your git repository. Here is where mine was:
That ZIP file is what you would normally download from the L2J site. All built yourself!
5) Now, repeat steps 3 & 4 above but select the Datapack Repository from bitbucket. You can find that here: https://bitbucket.org/l2jserver/l2j_datapack The URI is: https://bitbucket.org/l2jserver/l2j_datapack.git
The datapack source is much larger, so expect all of the loading/building steps to take longer this time. This is normal. The compiled files can be found in the exact same way, but in your DataPack repository location.
I hope this helped! Let me know if you have any questions.
[Tutorial] How to Compile L2J Server and DataPack
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 3
- Joined: Sun Jan 31, 2016 3:01 am
-
- Posts: 1
- Joined: Sat Jul 14, 2018 5:09 am
Re: [Tutorial] How to Compile L2J Server and DataPack
Thank you very much. Only took a little over a year. ^^
-
- Posts: 1
- Joined: Sun Aug 12, 2018 5:50 am
Re: [Gradle Error] - [Tutorial] How to Compile L2J Server and DataPack
Thank You very much for that tutorial, It is well written and is very easy to understand. At first everything went smoothly and exactly as described for the "l2j_server" files. I was even able to successfully build the ZIP file with the Gradle Task.
But at step 5.) I was able to clone the L2j_datapack repository next to the L2j-server repository ("../L2j_git/l2j_server" & "../L2j_git/l2j_datapack"). But it threw the following error message, while I was trying to import the l2j_datapack as a Gradle project.
Synchronize Gradle projects with workspace failed due to an error connecting to the Gradle build.
The supplied build action failed with an exception.
Could not resolve all dependencies for configuration ':compileClasspath'.
Project : declares a dependency from configuration 'compile' to configuration 'default' which is not declared in the descriptor for project :L2J_Server.
What did i do wrong? Can anyone please help me with this? Am I the only one facing this problem?
Edit (2018.08.12):
Im using:
Solution explanation:
After cloning the git-repositories the directory name of the l2j_server is written in lowercase, while the reference in the ../l2j_datapack/settings.gradle file is written with capital letters. Therefore editing the reference in the ../l2j_datapack/settings.gradle file solved the problem:
old ../l2j_datapack/settings.gradle
updated ../l2j_datapack/settings.gradle
But at step 5.) I was able to clone the L2j_datapack repository next to the L2j-server repository ("../L2j_git/l2j_server" & "../L2j_git/l2j_datapack"). But it threw the following error message, while I was trying to import the l2j_datapack as a Gradle project.
Synchronize Gradle projects with workspace failed due to an error connecting to the Gradle build.
The supplied build action failed with an exception.
Could not resolve all dependencies for configuration ':compileClasspath'.
Project : declares a dependency from configuration 'compile' to configuration 'default' which is not declared in the descriptor for project :L2J_Server.
What did i do wrong? Can anyone please help me with this? Am I the only one facing this problem?
Edit (2018.08.12):
Im using:
- Ubuntu 16.04 LTS
- the latest Eclipse version for Java Developers 64bit (http://www.eclipse.org/downloads/packag ... developers)
- Java 1.8.0_181
- the latest Updates of the Eclipse Plugins and Gradle version
Solution explanation:
After cloning the git-repositories the directory name of the l2j_server is written in lowercase, while the reference in the ../l2j_datapack/settings.gradle file is written with capital letters. Therefore editing the reference in the ../l2j_datapack/settings.gradle file solved the problem:
old ../l2j_datapack/settings.gradle
Code: Select all
include ':L2J_Server'
project(':L2J_Server').projectDir = new File(settingsDir, '../L2J_Server')
Code: Select all
include ':L2J_Server'
project(':L2J_Server').projectDir = new File(settingsDir, '../l2j_server')
-
- Posts: 196
- Joined: Sat Jul 04, 2009 8:54 am
Re: [Tutorial] How to Compile L2J Server and DataPack
any chance to make a tutorial for people who do not use git but svn with subversion?
can't get eclipse to work,and all the old tutorials images are not working anymore. would be great help.
can't get eclipse to work,and all the old tutorials images are not working anymore. would be great help.
- Zoey76
- L2j Inner Circle
- Posts: 7005
- Joined: Tue Aug 11, 2009 3:36 am
Re: [Tutorial] How to Compile L2J Server and DataPack
Why do you use SVN? Join us in Discord and we can help you get ready with Eclipse and Git.
Powered by Eclipse 4.30 | Eclipse Temurin 21 | MariaDB 11.3.2 | L2J Server 2.6.3.0 - High Five
Join our Discord!
Join our Discord!