Question about Cloning & Compile L2J

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
ChrisJH
Posts: 11
Joined: Thu Aug 13, 2015 5:49 pm

Question about Cloning & Compile L2J

Post by ChrisJH »

Hello, I'm trying to clone and compile the l2j project through eclipse,

tried with both develop or master branch.. followed this guide
with the only change of the git location added the new one (https://bitbucket.org/l2jserver/...)

I ticked the "import all existing projects after clone finishes" but the project dIdn't load
so I manually pressed on git repository and clicked "import project" .. the project came up and showed on project explorer but..
tons of errors , 37.769 errors what I'm doing wrong?

http://imgur.com/a/0qNUa
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7005
Joined: Tue Aug 11, 2009 3:36 am

Re: Question about Cloning & Compile L2J

Post by Zoey76 »

There are some minor issues on the Gradle script in master branch that are already fixed in develop branch.

You can switch to develop branch, and remove and re-import datapack (should import core as well).

Let me know if that works.
Powered by Eclipse 4.30 ๐ŸŒŒ | Eclipse Temurin 21 โ˜• | MariaDB 11.2.2 ๐Ÿ—ƒ๏ธ | L2J Server 2.6.3.0 - High Five ๐Ÿš€

๐Ÿ”— Join our Discord! ๐ŸŽฎ๐Ÿ’ฌ
ChrisJH
Posts: 11
Joined: Thu Aug 13, 2015 5:49 pm

Re: Question about Cloning & Compile L2J

Post by ChrisJH »

I tried both develop and master,

I followed what u said, deleted projects, re-imported datapack develop and then core, and again I got 38k errors,

I use w10, eclipse neon3 with only thing added from eclipse marketplace "Buildship Gradle Integration 2.0" (saw that on l2j wiki), last jdk and correct java_home variable, is something I doing wrong?

as I understand the errors are because datapack doesn't sees core, error example "import com.l2jserver...." (This Import cannot be resolved"

Sorry for the trouble, tnx for the help :)
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7005
Joined: Tue Aug 11, 2009 3:36 am

Re: Question about Cloning & Compile L2J

Post by Zoey76 »

Please check that the project folders are L2J_Server and L2J_DataPack.

Also check that L2J_DataPack's .classpath files looks like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="dist/game/data/scripts"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
	<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
	<classpathentry kind="src" path="/L2J_Server"/>
	<classpathentry kind="output" path="bin"/>
</classpath>
If you don't want to manually change the folder names, edit this .classpath file and change <classpathentry kind="src" path="/L2J_Server"/> to <classpathentry kind="src" path="/l2j_server"/>

let me know if this works.
Powered by Eclipse 4.30 ๐ŸŒŒ | Eclipse Temurin 21 โ˜• | MariaDB 11.2.2 ๐Ÿ—ƒ๏ธ | L2J Server 2.6.3.0 - High Five ๐Ÿš€

๐Ÿ”— Join our Discord! ๐ŸŽฎ๐Ÿ’ฌ
ChrisJH
Posts: 11
Joined: Thu Aug 13, 2015 5:49 pm

Re: Question about Cloning & Compile L2J

Post by ChrisJH »

l2jdatapack's classpath isn't like u said

it is :

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="dist/game/data/scripts"/>
	<classpathentry kind="lib" path="gradle/wrapper/gradle-wrapper.jar"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="output" path="bin"/>
</classpath>
also project's name is in non caps mode but same as u said .. so it is l2j_datapack and l2j_server

..
so I manually change .classpath to what u said, and I rename the projects to caps?
I ll try it now
Last edited by ChrisJH on Fri Mar 31, 2017 7:32 am, edited 1 time in total.
ChrisJH
Posts: 11
Joined: Thu Aug 13, 2015 5:49 pm

Re: Question about Cloning & Compile L2J

Post by ChrisJH »

Ok it seems that datapack's errors fixed, but there are 1k errors on server side, maybe I got to change .classpath of server also ?

some errors just in case they help :
import org.mockito...
import org_testing...
the import cannot be resolved

also after I did the changes this error appeared on eclipse:

http://imgur.com/a/uuKUU

thanks again for the help
ChrisJH
Posts: 11
Joined: Thu Aug 13, 2015 5:49 pm

Re: Question about Cloning & Compile L2J

Post by ChrisJH »

Okay I found the solution, with some search on google,

so I ll post it in case someone got the same problem with me

I went into my account folder on w10, found folder ".gradle" went into wrapper and then dists and deleted all folders there should be 1 or 2.

then opened eclipse, deleted projects and then went on File->Import, expand Gradle -> Import Gradle project
and it downloaded again the gradle and then the project load without errors and I could build successfully !!

the problem was my gradle was corrupted...

that post helped me also :
sahar wrote:
I got it, then how do I build it?

So far if anyone is interested a guide in details:
1) Install Gradle Buildship
* Open Eclipse
* Go to Help menu -> Eclipse Marketplace
* Search for Gradle Buildship
* Install the first plugin that appears
* Restart eclipse when it asks
2) Clone project
* Clone https://github.com/L2J/L2J_Server.git and https://github.com/L2J/L2J_DataPack.git as you would normally do
* Go to File menu -> Import...
* Expand Gradle -> Gradle Project
* Select the directory where you cloned L2J_Server and click finish
* Once done do the same to L2J_DataPack
3) Build project
* In the line of tabs (where you see Console, Problems etc) press Gradle Tasks
* Right click the project and click Run Default Gradle Tasks
Thanks for everything !
Post Reply