faint
你说清楚点你的意图(接收从键盘敲入的数据?为什么有socket连接)
从错误上来看,你肯定连上了一个socket连接,而且你当前程序是客户端,错误提示是你读取socket输入流(即从服务器端来的数据)出错,服务器已经断开了与你的连接
搞不清楚这和你“从键盘接受收入……”有什么关系???
……一头雾水中……

解决方案 »

  1.   

    如果是接收键盘输入,将输入流定义为
    DataInputStream dIn = new DataInputStream(System.in); 
    String str = dIn.readLine();//即可读得键盘输入的字符串
    //读取其它类型数据,改变相应方法即可
      

  2.   

    try
    {
      BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
      System.out.print("input 3 number>");
      String line = in.readLine();
      int x = Integer.parseInt(line);
      line = in.readLine();
      int y = Integer.parseInt(line);
      line = in.readLine();
      int z = Integer.parseInt(line);
      System.out.println(x+y+z);
    }
    catch(Exception ee)
    {}