Https://run-jetty-run.googlecode.com/svn-history/r280/Jetty8Support/bootstrap-jetty8/src/runjettyrun/Bootstrap.java
private static void Initeclipselistener (final configs configs) {//init Eclipse hook if (Configs.geteclipselistenerport ( !=-1) {Thread eclipselistener = new Thread () {public void run () {try {while (true) {Thread.s
Leep (5000L);
Socket sock = new socket ("127.0.0.1", Configs.geteclipselistenerport ());
byte[] response = new BYTE[4];
Sock.getinputstream (). Read (response); @see Runjettyrun.
Plugin#enablelistenter if (response[0] ==1 && response[1] ==2) {//it ' s ok!
}else{//eclipse crashs shutdownserver (); Unknownhostexception e) {System.err.println ("Lost connection with Eclipse, shutting down
.");
Shutdownserver ();
catch (IOException e) {System.err.println ("Lost connection with Eclipse, shutting down.");
Shutdownserver (); catch (Interruptedexception e) {System.err.println ("Lost connection with Eclipse, Shutting down. ");
Shutdownserver ();
}
};
};
Eclipselistener.start ();
}} private static void Shutdownserver () {try {server.stop ();
System.exit (-1);
catch (Exception E1) {e1.printstacktrace (); }
}