Comment on Tutorial - How to Send SMS using Java Program (full code sample included) By Emiley J.



Comment Added by : Anonymous

Comment Added at : 2012-03-25 02:12:52

Comment on Tutorial : How to Send SMS using Java Program (full code sample included) By Emiley J.
I set my eclipse as describe above.
I also change my SMSC no. in Sender.java as
private String csca=\"+919032055002\"; // the message center
Now I create one class like this:
public class MainClass {
   public static void main(String[] args) {
       String rec = \"9898565014\";
       String msg = \"Hiiii\";
       SMSClient smsClient = new SMSClient(1);
       smsClient.sendMessage(rec, msg);
   }
}
when I run this program then it show following error:
javax.comm.NoSuchPortException
   at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:105)
   at SerialConnection.openConnection(SerialConnection.java:70)
-----
-----
I am using Airtel MZ16USB Modem which is on COM 17
so where I need to change port number in the program or it will automatically detect this device.
Please help me.....


View Tutorial



Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. nice tutorial with discussion
View Tutorial          By: Md Firoz at 2012-01-07 11:00:29

2. Hi Johnny,

did you check whether th

View Tutorial          By: Frank at 2010-11-13 13:16:57

3. Can u show how to do text to speech with servlet.
View Tutorial          By: Rotika at 2011-01-23 20:54:40

4. The example is good but there is an easy to iterat
View Tutorial          By: manish at 2013-03-24 16:21:03

5. You should check out the new BonCode connector for
View Tutorial          By: Petro Donic at 2012-07-16 02:34:06

6. thanx for this post...its my exam of java day afte
View Tutorial          By: Prakhar at 2012-01-08 00:16:24

7. How to find port names in pc? like COM1 etc ? i wn
View Tutorial          By: layiba at 2013-12-25 08:28:30

8. what about object bean with view scope ??
View Tutorial          By: abdelaziz akharraz at 2012-10-09 15:06:52

9. @bibiki, you are right for simpler conditions what
View Tutorial          By: Marcin at 2012-04-05 02:34:13

10. Hello , How could i Run java.comm on eclipse

View Tutorial          By: Fiars at 2011-04-11 04:53:45