title: Java error sending sms message with gsm modem
body: <p>Hi there I am trying to send a sms message using Java with a GSM Modem
  I am learning from this URL:  <a href="http://www.codeproject.com/Tips/492716/How-to-send-SMS-using-Java-with-a-HSDPA-Dongle" rel="nofollow">http://www.codeproject.com/Tips/492716/How-to-send-SMS-using-Java-with-a-HSDPA-Dongle</a>
  Here is my code:</p>
  
  <p>import com.harshadura.gsm.smsdura.GsmModem;</p>
  
  <pre><code>public class TestSMS {
  private static String port = "COM1"; //Modem Port.
  private static int bitRate = 9600; //this is also optional. leave as it is.
  private static String modemName = "ZTE"; //this is optional.
  private static String modemPin = "0000"; //Pin code if any have assigned to the modem.
  private static String SMSC = "+9477000003"; //Message Center Number ex. Mobitel
  
  public static void main(String[] args) throws Exception {
      GsmModem gsmModem = new GsmModem();
      GsmModem.configModem(port, bitRate, modemName, modemPin, SMSC);
      gsmModem.Sender("+917350320106", "Test Message"); // (tp, msg)
  }
  }
  </code></pre>
  
  <p>I have added the various libraries to the built path of my project:</p>
  
  <pre><code>comm.jar
  commons-net-3.0.1.jar
  smsdura-1.0.jar
  RXTXcomm.jar
  </code></pre>
  
  <p>However, I get this error when i run the project:
   Exception in thread main org.smslib.GatewayException: Comm library exception:  java.lang.RuntimeException: javax.comm.NoSuchPortException</p>
  
  <p>Please help</p>