Jump to content

Recommended Posts

Posted

Tutorial : Downoad, edit sources and compile an l2jfree project with NetBeans.

(Windows XP version)

 

Notes :

 

      - This is the procedure I've followed for installing everything on my Asus Eee netbook, with standard Windows XP installation.

      Hopefully this will be clean enough and standard enough for anyone with the same OS to follow these simple steps. And maybe other OS's too, but I wouldn't guarantee it

 

      - In a few months I'll probably do this tutorial again for Windows Seven, if anything should be different.

 

      - If you want to compile on an UNIX-based system, I enjoin you to follow this link, where it is clearly exposed how to do so. (FIXME: LINK IS MISSING)

 

 

Step 1 : JDK.

 

      - Follow this link : http://java.sun.com/javase/downloads/index.jsp

      - Choose the JDK 6 Update 16 (or any newer version that you may find at the time you read this tutorial) by clicking on the orange "Download" button.

      - Choose Windows in the "platform" list. If you use Windows XP 64 of course, you should choose "Windows x64".

      - Click on the checkbox and then "continue"

      - On this page, click on the ".exe" link and download. Then install it as you would normally do with any windows program.

 

 

Step 2 : NetBeans

 

      - Go on this page : http://www.netbeans.org/downloads/

      - Choose the "download" button in the first column. You don't need extra stuff if you just want to mess with the l2jfree project. However, feel free to look around if you're interested in working with netBeans on other projects or languages.

      - Launch the install of the executable file you have just downloaded. At some point in the installation you will be asked to indicate the path to the JDK. If it isn't filled automatically by the installer, enter the path you have chosen in step 1 to install the JDK.

      - Launch the application and do all the suggested updates.

 

 

Step 3 : Subversion

 

      - Go there : http://www.open.collab.net/downloads/netbeans/

      - Choose the CollabNet Subversion Command Line Client v1.5.5 (for Windows)

      - Click on the orange download button, create an account and get the .exe file.

      - Install it

      - Open your command line (cmd.exe). Type "svn --version" and then enter. If you get an error message, do the following :

            - Go to Configuration panel->System->Advanced->Environment variables

            - In the system variables, Modify the path variable and add at the end the following :

            ";C:\Program Files\CollabNet Subversion Client" without the quotes. If you have installed subversion somewhere else, of course, enter the corresponding path in place of this one.

            - Check if it works by relaunching cmd.exe and typing svn --version again.

 

 

Step 4 : Checkout !

 

      - Restart NetBeans. All the updates should be done by now.

      - In the team menu, choose Subversion -> Checkout...

      - The repository URL is : http://svn.l2jfree.com/svn/l2j-free/

      - Browse the repository folders. The unstable but most up-to-date version is the one contained in trunk. Stable versions are in archive (last stable for each chronicle/throne) and tags (each version of login/gameserver)

      - Choose the local folder in which all the sources will be extracted.

      - Click on finish.

      - A project should have appeared in your left sidebar, called l2jfree-main something. Extend it, then choose module, and you should see the different parts : l2jfree-core, l2jfree-login, etc.

      - Open them all by right-clicking and choosing "Open Project".

 

 

Step 5 : Maven

 

      - Well, now you've got all your sources, you can edit them as you like, but you might want to compile now.

      - You need to download maven http://www.apache.org/dyn/closer.cgi/maven/source/apache-maven-2.2.1-bin.zip

      - Unzip it wherever you like but remember the path !

      - In NetBeans, open the Tools menu and select Options.

      - Click on the "Miscellaneous" icon.

      - Click on "Maven"

      - In the "External maven home" textbox, enter the path I asked you to remember earlier.

      - In the "global options definition" field, write "-Dmaven.test.skip=true" (without quotes of course)

 

 

Step 6 : Finally, compile !

 

      - Now right click on an opened project (first you need to compile l2j-commons and mmocore in order to make it work for login and core) and choose Custom -> Goals...

      - There, in the "Goals" field, just write "assembly:assembly" and then click "OK". Compilation should start.

      - If you get an error saying something like "Java heap space / out of resources", you need to go to your Maven directory, in the "bin" subdir, and edit the mvn.bat file :

            - Find the line beginning by the following string : "%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR%"

            - Replace it with "%MAVEN_JAVA_EXE% %MAVEN_OPTS% -Xmx1024m -classpath %CLASSWORLDS_JAR%"

            - If you have 1 Go of RAM or less, you might want to write "-Xmx512m" instead, because your system won't be ale to allocate 1 Go for the heap.

            - Retry compiling.

      - Your server is now compiled and ready to be run.

 

all credits go to shinzer0

Posted

Why eclipse is better ? I think netbeans is faster and it have easy interface :) Ty

 

Because of coding amenities.

  • 2 months later...
Posted
Step 3 : Subversion

 

      - Go there : http://www.open.collab.net/downloads/netbeans/

      - Choose the CollabNet Subversion Command Line Client v1.5.5 (for Windows)

      - Click on the orange download button, create an account and get the .exe file.

      - Install it

      - Open your command line (cmd.exe). Type "svn --version" and then enter. If you get an error message, do the following :

            - Go to Configuration panel->System->Advanced->Environment variables

            - In the system variables, Modify the path variable and add at the end the following :

            ";C:\Program Files\CollabNet Subversion Client" without the quotes. If you have installed subversion somewhere else, of course, enter the corresponding path in place of this one.

i don this all but in CMD i have error

 

C:\Documents and Settings\Leki>svn --version
svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LANG is not set
svn: warning: please check that your locale name is correct
svn, version 1.6.12 (r955767)
compiled Jun 21 2010, 16:00:59

 

what is problem?

            - Check if it works by relaunching cmd.exe and typing svn --version again.[/quote

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...