import java.io.*;
import java.net.*;
public class EchoChar{
  public static void main(String[] args) throws IOException{
     Socket echoSocket=null;
     DataOutputStream out=null;
     BufferedReader in=null;
      try{
       System.out.println("jjjjjjjj");
***       echoSocket= new Socket("127.0.0.1",8080);
       System.out.println("kkkkkkk");
       echoSocket.setReceiveBufferSize(1024);
       echoSocket.setSendBufferSize(1024);
       out=new DataOutputStream(echoSocket.getOutputStream());
       in=new BufferedReader(new InputStreamReader(echoSocket.getInputStream()));
       }catch(UnknownHostException e){
         System.err.println("Don't know about host");
         System.exit(1);
      }catch(IOException e){
         System.err.println("Couldn't get I/O for the conection");
         System.exit(1);
      }
       BufferedReader stdIn=new BufferedReader(new InputStreamReader(System.in));
      String userInput;
      while((userInput=stdIn.readLine())!=null){
out.writeBytes(userInput);
out.writeByte('/');
System.out.println("echo:"+in.readLine());
      }
out.close();
in.close();
stdIn.close();
echoSocket.close();
    }
}这是一个创建一个socket用于本机通信的小程序编译可以通过
运行时每次只输出:
jjjjjjjj
Couldn't get I/O for the conection是不是我打星号的那行不对啊 到底是什么原因呢???