you can use smslib [1]: http://smslib.org/ , which is a library that supports java.net, through which you can use an sms gateway, such as a modem gateway, or you can use a mobile (like sms gateway ) to send SMS and receive.
Personally, I offer you development and testing, I did some research and came to the conclusion that as soon as you move your application to production and connect to your modem or sms modem, this is a little tiring, as far as I know :), at this stage there is many online sms gateway providers based on your location that provide you with an interface where you can send / receive messages, and this may cost you.
pappu_kutty
source share