IDE 是eclipse!
  在网络编程用Socket的时候TCP端口有时被占用,请问是咋会事!!>>>
如    
方法
public void connServer
        {
     ServerSocket ss = null;
     try {
      ss= new ServerSocket(TCP_PORT);
     } catch (IOException e1) {
e1.printStackTrace();
     }finally
{

 if(ss!=null)
  {
   try {
   
   ss.close();
   ss = null;

  } catch (IOException e) {
    e.printStackTrace();
 }
      }
      }