I have used JSch Sudo example under following link:
http://www.jcraft.com/jsch/examples/Sudo.java.html
And changed it a bit and get rid of all the dialogs as
After setting
((ChannelExec) channel).setPty(true)
the reported problem have in my code got solved.