Marauroa Chat Tutorial: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Blacklads Undo revision 11675 by Ufizavipupu (Talk) |
imported>Hendrik Brummermann →Deployment: fixed server.ini section |
||
| Line 191: | Line 191: | ||
This command assumes that you have source files, marauroa.jar and log4j.jar in the same directory. You will receive World.class and Rule.class output files. |
This command assumes that you have source files, marauroa.jar and log4j.jar in the same directory. You will receive World.class and Rule.class output files. |
||
In order to run the server you will also need |
In order to run the server you will also need server.ini file: |
||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
Follow the on-screen instructions and you will eventually get the server.ini file. It is a simple text file which you can easily edit. Actually in order to get server running you must modify world and ruleprocessor settings so that they look like |
|||
<pre> |
<pre> |
||
database_adapter=marauroa.server.db.adapter.H2DatabaseAdapter |
|||
jdbc_url=jdbc:h2:~/clientserverchat/database/h2db;AUTO_RECONNECT=TRUE;DB_CLOSE_ON_EXIT=FALSE; |
|||
jdbc_class=org.h2.Driver |
|||
# TCP port |
|||
tcp_port=32160 |
|||
# World and RP configuration. Don't edit. |
|||
world=World |
world=World |
||
ruleprocessor=Rule |
ruleprocessor=Rule |
||
turn_length=300 |
|||
</pre> |
</pre> |
||
Please run the following command to generate a key pair which will be used to encrypt the login information. Simply copy the output at the end of server.ini. |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
Now you are all set to get your server up and running. To start the server I usually use the following command |
Now you are all set to get your server up and running. To start the server I usually use the following command |
||
<pre> |
<pre> |
||
java -cp marauroa.jar; |
java -cp marauroa.jar;h2.jar;log4j.jar;. marauroa.server.marauroad -c server.ini |
||
</pre> |
</pre> |
||
Of course, make sure that all the jars are in the current directory. Marauroa framework will parse server.ini file, find and load your classes World and Rule. |
Of course, make sure that all the jars are in the current directory. Marauroa framework will parse server.ini file, find and load your classes World and Rule. |
||
== Text client == |
== Text client == |
||
=== Code === |
=== Code === |
||