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] L2J from SVN in NetBeans 7

Find all FAQs, HOWTOs and guides here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
L2j Senior Developer
L2j Senior Developer
Posts: 795
Joined: Sun Aug 14, 2005 11:27 am

[Tutorial] L2J from SVN in NetBeans 7

Post by HorridoJoho » Sun Oct 09, 2011 11:07 am

1. Preface
NetBeans 7 installed out of the box with SVN functionality, i didn't need to install anything else expect NetBeans 7 itself.

2. Checkout from SVN
In menu go to Team -> Subversion and click on Checkout.... The Checkout dialog opens and the only field you need to fill is the Repository URL:
Click on Next > to get to the next step. Choose the Repository Folders(s) to checkout and click on Finish to checkout the selected folder(s). Don't create a project from the checked out sources when you're asked!

3. Import Eclipse projects
-> (To make it simple choose the same folder for Project to Import and Destination Folder. It will avoid build.xml confusion. NetBeans 7 will prefix it's own files which would be named like the Eclipse ones with "nb-")
In menu go to File -> Import Project and click on Eclipse Project.... The Import Eclipse Project dialog opens and if you want to import your whole Eclipse workspace into NetBeans 7 choose Import Projects from Workspace. But that's not out goal since we checked out the L2J sources from SVN with NetBeans 7 and not Eclipse. So choose Import Project ignoring Project Dependencies. Now you select the Project to Import(checkout folder where eclipse project file resides in) and Destination Folder(where you want the NetBeans 7 settings and project files to be stored). For L2J_DataPack NetBeans 7 will report import issues(can't find jar libraries). Just close the opened Import Issues dialog. Now another dialog opens where you click on Resolve Problems.... In the next dialog you click on Resolve... to browse for one of the missing jar libraries. When the location of one is choosen the rest should be resolved automatically. Now you can close this dialog.

4. Additional required changed
Now that we have L2J_Server and L2J_DataPack projects imported we have to make some changes. We don't want the Java editor to report errors where no errors are. Since we did import single Eclipse projects the Source/Binary Format defaults to JDK 5(this informations are saved in workspace settings). Right click the projects and click on Properties. Now go to Categories -> Sources and set the Source/Binary Format to JDK 7. Do this changes on L2J_DataPack and L2J_Server.

5. Compile and Build
To compile the projects with the build.xml provided in SVN you have to go into the Files windows, right click build.xml, go to Run Target and click on dist.
Everything is a usual and you will have your zip files in the build folders.

6. Apply patches
To apply patches, do not right click on the project itself, but on it's Source Packages otherwise NetBeans 7 will try to apply the patch on the NetBeans 7 created folder and not on the source checked out from SVN and that will fail i
guess :). So to apply a patch select the Source Package you want to apply the patch to and in menu go to Team -> Apply Diff Patch....

That's all, happy NetBeaning :)
Last edited by HorridoJoho on Sun Oct 09, 2011 1:48 pm, edited 6 times in total.

User avatar
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria

Re: [Tutorial] L2J from SVN in NetBeans 7

Post by UnAfraid » Sun Oct 09, 2011 12:32 pm

Looks nice could be moved in FAQ / Wiki

User avatar
L2j Inner Circle
L2j Inner Circle
Posts: 3046
Joined: Sun Aug 07, 2005 11:42 pm
Location: Slovakia

Re: [Tutorial] L2J from SVN in NetBeans 7

Post by Aikimaniac » Sun Oct 09, 2011 7:06 pm

I think the right area for such stuff should be http://www.l2jserver.com/wiki/Main_Page

Post Reply