Up Previous Next

Sometimes (but not always) the server needs to be started in this fashion:
java -Djava.security.policy=.java.policy Server 18276
If the name of the file is as above the -D switch is not necessary.

The contents of this file instructs the server to accept incoming connections from everywhere:

grant { 
  permission java.net.SocketPermission "*", "connect,accept";
};
At this stage we are simply finished.

Nothing that we will do from now on will ever add more networking code to what we said so far.

That's all that we need to know about the program being run in a distributed fashion.

So the program can be developed into a full game without any reference to whether it will run locally or over the network.

From here on the network is (and as a matter of fact even up to here the network was) completely transparent.

All the networking code is in the decorations or in the separate setup main methods.

Let's think about this a little bit before we go any further.


Up Previous Next