These are the prerequisites for JUOServer users:
All the properties needed by the server in order to properly work are looked up in a property file whose absolute path can be specified by defining a system property named juoserver.propFilePath - e.g.,
... -Djuoserver.propFilePath=/path/to/myjuoserver.properties ...
If this system property is not specified, the server tries to read the property file from the following default location:
YOUR_HOME/.juoserver/juoserver.properties
Up until now, the following properties exist:
The default value of the server.host property is localhost, which is suitable only for the case in which both server and client run on the same machine (see below for details).
Note that this property's value is not necessarily the same as the internet address on which the server will listen on; in particular, the UO login protocol requires that (see also the Protocol getting started page):
This distinction is important in all cases in which the address that clients actually used to initially connect to the server (defined in the Razor window) differs from this property's value, because it is possible that while the former is reachable from the client, the latter is not.
For example, if you don't specify a value for the server.host property, start both the server and the client on the same computer and select localhost on the Razor window, then you'll have no problem in connecting and proceeding into the game, because both connections (the initial one and the one used after the server has been selected) will be the same (localhost).
Instead, if you still don't specify a value for the server.host property and start the server on one machine, S and the client from another machine C, the initial connection will succeed, meaning you'll get past the login screen (where you enter username and password), but when you select the server the client will hang for sometime and eventually yield the following message: "The client could not attach to the game server. It must have been taken down, please wait a few minutes and try again". This happens because, even though the client machine C can reach the server machine S (i.e., it can ping it), C won't recognize S by the name localhost.
For this reason, the server.host property should be set to an internet address that clients will be able to connect to after they've looked it up: for a LAN environment it can be something like 10.0.0.105, while for a real WAN usage it must be a public internet address (either a numberic IP or a resolvable name). You can avoid specifying this property only if you run both the server and the client on the same machine.
This is sample contents of the property file:
uopath = /home/myuser/UOML server.host = 10.0.0.105 server.port = 2593
Furthermore, if you want to use the CustomizationHelper class, you'll need to define the following properties:
If you have Maven and a working copy of the project, you start the server by issuing the following command from the project's base directory (unless you modify the script, if you use this method the property file is searched for in the default location):
$ ./juoserver 21:38:11,744 INFO [Server] listening on port 7775
This is how you start the server without having Maven installed (the "\" symbol is a way to split the command line into more lines on Linux shells):
$ java -Djuoserver.propFilePath=/path/to/my.properties -jar juoserver-VERSION-jar-with-dependencies.jar ... 17:19:43,033 INFO [Server] listening on port 7775
The juoserver-VERSION-jar-with-dependencies.jar file can be downloaded from the sourceforge download page, and VERSION is something like 1.0.0-20110501.153224-5 (when the project has non-SNAPSHOT versions, this will simply be like 1.0.0).
From version 1.0.1, "real" credentials must be provided in order to log in: admin / admin.
By now you'll just be able to:
All the data is hard-coded, including:
This is how you use the project as a dependency from another Maven project:
<repositories> <repository> <id>juoserver-repo</id> <name>juoserver-repo</name> <url>http://sourceforge.net/projects/juoserver/files/repo</url> </repository> </repositories> <dependencies> <dependency> <groupId>net.sf.juoserver</groupId> <artifactId>juoserver</artifactId> <version>1.0.0-SNAPSHOT</version> </dependency> </dependencies>