View Javadoc

1   /*
2   @See License.txt@
3    */
4   
5   package spellcast.server;
6   
7   import java.net.InetAddress;
8   
9   import org.apache.log4j.Logger;
10  import spellcast.net.NetConstants;
11  
12  /***
13   * The Main class for starting the Spellcast Server.
14   *
15   * @author Barrie Treloar
16   */
17  public class Main {
18      Logger logger = Logger.getLogger("server");
19  
20      public Main(String[] args) throws Exception {
21          System.setErr(System.out);
22          Server.createServer(
23              InetAddress.getLocalHost(),
24              NetConstants.SPELLCAST_NET_DEFAULT_PORT,
25              args[0]);
26          logger.info("Spellcast Server started.");
27      }
28  
29      public static void main(String[] args) throws Exception {
30          new Main(args);
31      }
32  }