Android: Failed to parse the output of ‘adb version’

I tried to create java app fro connecting to Android device.
Here is the code:

Starting the program returns the error:
Failed to parse the output of 'adb version'

Solution is found on stackoverflow Failed to parse the output of ‘adb version’?
The problem was in COMODO Antivirus. Steps to do in the answer http://stackoverflow.com/a/8988993.

  • run comodo settings
  • defense+
  • list active processes
  • add adb.exe to trusted processes
  • restart server: run “adb kill-server” “adb start-server”