The problem was on the eclipse, and it was common with USB. eclipse disconnected because could not detect change on files for long enough time for it.