Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tutorial] Compiling Java emulator by Angelis86

Newbie Spellweaver
Joined
Feb 2, 2014
Messages
74
Reaction score
22
Hello,
This guide will tell you how to compile and run Jenova Project - Tera emulator based on java by Angelis86 locally.


What you will need:
Up to date EU Tera client by Gameforge. ( )
TortoiseSVN ( )
The source from Angelis86 checked out. ( )
Java JDK 8u05 ( )
Maven ( )
XAMPP (this guide shows you how to connect to MySQL using XAMPP.) ( )
MySQL (you don't need to download it if you have downloaded XAMPP, but if you choose to download this one you're on your own.)( )
7zip or Winrar ( ) or ( )
Optional: Notepad++ (recommended) ( )


Step 1: Checking out the source.
Assuming you have the Tera client downloaded and updated to the latest version you should now download
TortoiseSVN. Install it to any place you like. Now create a new folder somewhere on your computer and
right click it and press "SVN Checkout..." Now copy and paste the subversion link of Angelis' source.
( )
Let it download.


Step 2: Setting environment variables.
Download the Java JDK 8u05 and install it. Open cmd (windows key + R and type cmd) and type in java -version.
If it displays the java version you're good for the java environments, but you still have to set the maven environments.
Download apache-maven-3.2.1-bin.zip and unzip it to where you want to install it,
for example C:\Program Files\Apache Software Foundation\apache-maven-3.2.1
Now press your Windows Key + Pause, next press Advanced system settings on your left and then click Environment Variables...
Set the JAVA_HOME environment variable under User variables to point to the base directory location where Java is installed on your machine.
Click New...
Set variable name: JAVA_HOME
Set Variable value to where you installed java jdk for example:
C:\Program Files\Java\jdk1.8.0_05
Next create the user variable M2_HOME with value C:\Program Files\Apache Software Foundation\apache-maven-3.2.1 or wherever you installed it.
Now create the user variable M2 with value %M2_HOME%\bin.
Create the user variable MAVEN_OPTS with value -Xss10M
Edit the PATH user variable, if it doesn't exist under user variables create it now with the
name PATH and variable %JAVA_HOME%\bin;%M2_HOME%\bin
Under system variables edit the variable Path.
Go the furthest end of the Variable value field and put ;C:\Program Files\Java\jdk1.7.0_51\bin;C:\Program Files\Apache Software Foundation\apache-maven-3.2.1
Click ok.
Now open cmd again by clicking Windows Key + R and type cmd.
Type: java -version
If the version comes up in cmd you're good with the java variables.
next type: mvn -version
Same here, if maven version comes up you're good to go.
And you're done with setting the variables!
If for some reason maven still doesn't work, try this quick fix:
Open cmd and type: set PATH=%PATH%;%M2_HOME%\bin


Step 3: Setting up MySQL using XAMPP
Download and install XAMPP. I like because it has Apache, MySQL, FileZilla, Mercury and Tomcat all in one application.
Start up XAMPP and under Service click the red X under Apache and MySQL. Let it finish.
Next click Admin under Apache. should now open in your web browser.
Navigate to Security, click the link that says
Under the MySQL Section don't type in anything under Current password
Type any password you like under New password and repeat it.
Click Password changing.
Now go back to the XAMPP control panel and click Config under Apache. Click phpMyAdmin (config.inc.php)
Type in your MySQL password here: $cfg['Servers'][$i]['password'] = '';
so it looks something like this: $cfg['Servers'][$i]['password'] = 'my-password';
and save it.
Press Admin under MySQL in the XAMPP control panel.
You should see some databases to your left. Click on New at the top and name it tera.
You're done with step 3!


Step 4: Compiling the java source by Angelis86.
Navigate to the folder you checked out the source in with the command prompt by typing cd
and then the path to the source.
(path to checked out source)\TeraBuilder
Press enter and then type:
mvn clean compile package
Now the server should be compiled and there should be a bin folder in the TeraBuilder folder.
If there is a TeraGame.jar in bin\game with the size around 8mb it finished successfully.
Next go into bin\game\conf and edit the hibernate.cfg.xml with your MySQL password.


Step 5: Running the server and connecting to localhost.
Run start.bat in the ...\TeraBuilder\bin\game folder and wait until everything has finished loading.
Check to see if the tables was created under the tera database in MySQL by going to the XAMPP control panel
and pressing Admin under MySQL and opening the tera database. There should now be 7 tables in there.
If there aren't, simply go into bin\game\conf and edit hibernate.cfg.xml and uncomment the line that looks like this:
<!-- <property name="hbm2ddl.auto">create-drop</property> -->
so it looks like this:
<property name="hbm2ddl.auto">create-drop</property>
Now run start.bat again, the tables should now be created. Now you can comment that line again so the tables aren't created everytime you start the server.
Next download this file and unrar it into your TERA folder, example:
C:\Program Files (x86)\TERA
There should now be a launch.bat and Tera.en.exe in your tera folder. (Or tera.fr.exe if you want to start the client in french.)
Run launch.bat and enter any username you like and any password you like. choose FR or EN as language.


Congratulations you can now connect to your local server!
If you want to connect over the internet to your newly compiled Java server, go here: http://forum.ragezone.com/f798/tutorial-connecting-java-server-internet-997818/
 
Last edited:
Junior Spellweaver
Joined
Jul 19, 2013
Messages
119
Reaction score
70
Oh man you did that.
REALLY THANK YOU !

That was missing, now every one can compile his own server.

Angelis.
 
Newbie Spellweaver
Joined
Nov 16, 2012
Messages
54
Reaction score
0
hi new on this.. can i play this with my friend via LAN offline without Internet?? by using Crossover cable wire??

we just want to play it offline.

THANKS!!
 
Junior Spellweaver
Joined
Jul 19, 2013
Messages
119
Reaction score
70
Off course. You can play from LAN and
internet.

Angelis
 
Newbie Spellweaver
Joined
Nov 7, 2009
Messages
27
Reaction score
2
im getting this issue when trying to build the source

[WARNING] Some problems were encountered while building the effective model for com.angelis:TeraCommon:jar:1.0.0
[WARNING] 'dependencies.dependency.systemPath' for com.gnu:crypt:jar should not point at files within the project d
irectory, ${project.basedir}/lib/gnu-crypto-2.1.0.jar will be unresolvable by dependent projects @ line 20, column
25
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.angelis:TeraLauncher:jar:1.0.0
[WARNING] 'dependencies.dependency.systemPath' for com.oracle:javafx:jar should not point at files within the proje
ct directory, ${project.basedir}/lib/jfxrt.jar will be unresolvable by dependent projects @ line 19, column 16
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]

EDIT: the start.bat doesnt seem to start the server either this command java -cp ./lib/*:TeraGame.jar com.angelis.tera.game.MainGame does nothing but i can get it to run if i make a bat with java -jar TeraGame.jar so let me know what is going on or what i have done wrong
 
Last edited:
Newbie Spellweaver
Joined
Feb 2, 2014
Messages
74
Reaction score
22
Problems with latest commit I believe, I cannot start the server with rev 32. We must await Angelis' return.:call2:
 
Newbie Spellweaver
Joined
Nov 7, 2009
Messages
27
Reaction score
2
ok so its not something i did lol



i reverted to revision 31 and the server starts just fine, i can try to pinpoint what the error is using the change log on tortoise svn



looks like

java -cp ./lib/*:TeraGame.jar com.angelis.tera.game.MainGame

needs to be changed to

java -cp ./lib/*;TeraGame.jar com.angelis.tera.game.MainGame
 
Newbie Spellweaver
Joined
Feb 2, 2014
Messages
74
Reaction score
22
looks like

java -cp ./lib/*:TeraGame.jar com.angelis.tera.game.MainGame

needs to be changed to

java -cp ./lib/*;TeraGame.jar com.angelis.tera.game.MainGame
Tried it, it gives me lots of errors on rev 32. I'm just gonna wait until Angelis provides a patch.
 
Newbie Spellweaver
Joined
Jun 25, 2012
Messages
10
Reaction score
0
Hi, it seems that it worked fine in the compilation and server is running successfully but my problem is about an unknown packet.
I couldn't seem to connect my "newly created account" via launch.bat as it does not connect to the SQL itself.
Even if I login through the launch.bat, it does not register my account in the database. It also said the following:

Client connected
CryptSession inited
Unknow packet with id 0x9CE2:
0000: 13 00 25 00 06 00 00 00 00 00 00 06 00 00 00 66
0010: 00 ** 00 ** 00 ** 00 ** 00 ** 00 ** 00 ** 00 00
0020: 00 ** ** ** ** ** **

P.S. I marked the ** as they were my account info hex code. XD
Basically, I get this Unknown packet with id 0x9CE2 error.

EDIT: Seems like my problem is my launcher. I tried the TeraWatcher but I couldn't get it to work! >.<
 
Last edited:
Junior Spellweaver
Joined
Jul 19, 2013
Messages
119
Reaction score
70
Hello.

What tera client version are you using ?
You need the latest EU.
 
Newbie Spellweaver
Joined
Feb 2, 2014
Messages
74
Reaction score
22
@Asera It seems to me that your server isnt connecting to your sql database. Have you edited the hibernate.cfg file to your database credentials?
 
Initiate Mage
Joined
Apr 18, 2014
Messages
3
Reaction score
0
Hello.
I have same problem like asera. The server is running, but unknow packet:

unknow packet with id 0x7c90;

no have quests, the mobs not give xp, the spells not work.

i downloaded this:

client, but i dont know, to the launcher completely patched, becouse i cant log in, or register, becouse not allowed my country. Anyione can link me a torrent link?

thanks the answers.
 
Last edited:
Newbie Spellweaver
Joined
Apr 28, 2014
Messages
86
Reaction score
28
I get this error when compiling

C:\ApplicationFolder\TeraOnline\Tera-SVN>mvn clean compile package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.078 s
[INFO] Finished at: 2014-04-29T06:28:10-05:00
[INFO] Final Memory: 4M/117M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM
in this directory (C:\ApplicationFolder\TeraOnline\Tera-SVN). Please verify you
invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1]
Exception
C:\ApplicationFolder\TeraOnline\Tera-SVN>


Variabels (Name - value)
USER
JAVA_HOME - C:\Program Files\Java\jdk1.7.0_55
M2 - %M2_HOME%\bin
M2_HOME - C:\ApplicationFolder\apache-maven-3.2.1
MAVEN_OPTS - -Xss10M
PATH - %JAVA_HOME%\bin;%M2_HOME%\bin

SYSTEM
Path - C:\Program Files (x86)\PHP\v5.5;C:\Program Files (x86)\Mozilla Firefox;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MySQL\MySQL Utilities 1.3.6\;C:\ApplicationFolder\TortoiseSVN\bin;C:\Program Files\Java\jdk1.7.0_55\bin;C:\ApplicationFolder\apache-maven-3.2.1

mvn -version
C:\ApplicationFolder\TeraOnline\Tera-SVN>mvn -version
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T12:37:5
2-05:00)
Maven home: C:\ApplicationFolder\apache-maven-3.2.1
Java version: 1.7.0_55, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_55\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows server 2008 r2", version: "6.1", arch: "amd64", family: "windo
ws"
C:\ApplicationFolder\TeraOnline\Tera-SVN>

java -version

C:\ApplicationFolder\TeraOnline\Tera-SVN>java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
 
Newbie Spellweaver
Joined
Feb 2, 2014
Messages
74
Reaction score
22
Make sure your SYSTEM Path is set to mavens bin directory. Other than that all i can see is you're missing a pom.xml file, needed for compilation. Try updating your repository with TortoiseSVN. Are you trying to build the project in the TeraBuilder folder? If not then that is probably your issue.
 
Back
Top