I'm going to use netbeans
, and the program and what's at this link: #
First I run the server says: server is running
then I run the client: and error appears on lines 28 and 187 but it does not say what type of error it is, the lines are these:
try
{
server = new ServerSocket(5000,2); // <- linha 28 erro !
}
and the other error is this:
public static void main( String args[] )
{
JFrame.setDefaultLookAndFeelDecorated(true);
TicTacToeServerProtocolo game = new TicTacToeServerProtocolo(); // <- erro 187 nesta linha !!
game.execute();
}
Both errors are from the "TicTacToeClientProtocolo.java" program
Correct me if you are doing any wrong procedure. The game in question is the "Game of the Old one" as it is in the link that I provided of this site also, it is an equal question but relative to notepadd ++ but the objective is the same, ie, to work the server and the client at the same time (old game).
I know this code works (TicTacToe) because I saw it work on a friend of mine who gave me this code. He also used netbeans.
In the output "Output" exactly this message appears:
run:
java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(DualStackPlainSocketImpl.java:106)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:382)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at java.net.ServerSocket.<init>(ServerSocket.java:181)
at TicTacToeServerProtocolo.<init>(TicTacToeServerProtocolo.java:28)
at TicTacToeServerProtocolo.main(TicTacToeServerProtocolo.java:187)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)