Hi i have got a problemm with sockets i have a code and if i compile it and want to start there is a socket error.
My error is: java.net.SocketException: Unrecongnized Windows Sockets error: 10106: create
My source code:
import java.util.*;
import java.io.*;
import java.net.*;
public class Server
{
private static final int PORT = 1306;
public Server(){}
public static final void main(String[] arguments)
{
try
{
ServerSocket server_socket = new ServerSocket(PORT);
System.out.println("Server : wait ... "
Socket sogget = server_socket.accept();
System.out.println("Server : connection ok!"
BufferedReader input = new BufferedReader( new InputStreamReader(sogget.getInputStream()));
System.out.println(" Server : recieved \"" + input.readLine() + "\""
OutputStreamWriter out_put = new OutputStreamWriter(sogget.getOutputStream());
output.write("OK."
output.flash();
System.out.println("Server : reply \"ok.\""
}
catch(IOException ioe)
{
ioe.printStackTrace();
}
}
}
thx for help
Developer System:
Win 2k Professional with Service Pack 3
1800+ Athlon XP
1 Networkcard
No Firewall or something else
No Anti-Virus-Programm
My error is: java.net.SocketException: Unrecongnized Windows Sockets error: 10106: create
My source code:
import java.util.*;
import java.io.*;
import java.net.*;
public class Server
{
private static final int PORT = 1306;
public Server(){}
public static final void main(String[] arguments)
{
try
{
ServerSocket server_socket = new ServerSocket(PORT);
System.out.println("Server : wait ... "
Socket sogget = server_socket.accept();
System.out.println("Server : connection ok!"
BufferedReader input = new BufferedReader( new InputStreamReader(sogget.getInputStream()));
System.out.println(" Server : recieved \"" + input.readLine() + "\""
OutputStreamWriter out_put = new OutputStreamWriter(sogget.getOutputStream());
output.write("OK."
output.flash();
System.out.println("Server : reply \"ok.\""
}
catch(IOException ioe)
{
ioe.printStackTrace();
}
}
}
thx for help
Developer System:
Win 2k Professional with Service Pack 3
1800+ Athlon XP
1 Networkcard
No Firewall or something else
No Anti-Virus-Programm