title: sending sms from pc to mobile
body: <p>i am using smsj api to send sms from pc to mobile through gsm modem. as given on the <a href="http://smsj.sourceforge.net/" rel="nofollow">page</a>, i have tried the following code. </p>
  
  <pre><code>package org.marre;
  
  import java.io.IOException;
  import org.marre.sms.SmsException;
  
  
  public class SendMessage  {
  
      public void send() {
      try{
  
           // Send SMS with clickatell
           SmsSender smsSender = SmsSender.getGsmSender("COM7");
           String msg ="sample message";
           // International number to reciever without leading &amp;quot;+&amp;quot;
           String reciever = "9561356345";
           // Number of sender (not supported on all transports)
           String sender ="9561356345";
           // Connect
           smsSender.connect();
           // Send message
           smsSender.sendTextSms(msg, reciever, sender);       
           // Disconnect
           smsSender.disconnect();
      } catch(IOException i){
          i.printStackTrace();
          System.out.println("i");
      } catch(SmsException s){
          s.printStackTrace();
          System.out.println("s");
      }
      }
  
      public static void main(String args[]){
          SendMessage app = new SendMessage();
          app.send();
      }
  
  
  }
  </code></pre>
  
  <p>but i am getting this error message:</p>
  
  <pre><code>    Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
      at org.marre.sms.transport.gsm.SerialComm.&lt;clinit&gt;(SerialComm.java:58)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)
      at org.marre.sms.transport.gsm.GsmTransport.class$(GsmTransport.java:83)
      at org.marre.sms.transport.gsm.GsmTransport.&lt;clinit&gt;(GsmTransport.java:83)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)
      at org.marre.sms.transport.SmsTransportManager.getTransport(SmsTransportManager.java:75)
      at org.marre.SmsSender.&lt;init&gt;(SmsSender.java:112)
      at org.marre.SmsSender.getGsmSender(SmsSender.java:180)
      at org.marre.SendMessage.send(SendMessage.java:12)
      at org.marre.SendMessage.main(SendMessage.java:30)
  Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 12 more
  </code></pre>
  
  <p>i am a beginner in java. please help me with the code.</p>
  
  <p><strong>note:</strong>  i have used smslib api earlier for sending a simple text message. but this does not support ems messages. if you have any other library in mind which supports ems messages, please let me know. smsj was one i could easily download. </p>