We moved our repositories to BitBucket!

If you can't login or you can't register to the forums do not rise an issue, instead please write to support (at) l2jserver.com

Check our wiki!

Report server issues here

Forum has been updated to phpBB 3.2, let's see if this fixes some minor bugs we had.

Thank you for visiting http://www.l2jserver.com/

[Tutorial] How to Compile L2J Server and DataPack

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
colonelcorn
Posts: 3
Joined: Sun Jan 31, 2016 3:01 am

[Tutorial] How to Compile L2J Server and DataPack

Post by colonelcorn » Wed Feb 22, 2017 6:37 pm

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.
Image

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.
Image
Image

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.
Image

Go to Window -> Show View -> Other and Select Git -> Git Repositories
Image
Image

In the window that has now been added to your workspace, select "Clone a Git Repository"
Image

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".
Image

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".
Image

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.
Image

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.
Image

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.
Image

Now, if you don't currently have the "Package Explorer" Pane open, you can open it by going to Window -> Show View -> Package Explorer
Image

Right click in the "Package Explorer" pane and select "import".
Image

Select Gradle -> Gradle Project and click Next.
Image

On the Welcome Page, click Next.
Image

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.
Image

Then Click "Finish". Wait for it to synchronize the workspace.
Image

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.
Image
Image

Expand l2j_server -> Build. Right click on "build" and select "run gradle tasks".
Image

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:
Image

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
Image

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.

ROFLBBQ
Posts: 1
Joined: Sat Jul 14, 2018 5:09 am

Re: [Tutorial] How to Compile L2J Server and DataPack

Post by ROFLBBQ » Sat Jul 14, 2018 6:09 am

Thank you very much. Only took a little over a year. ^^

Post Reply