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



Subscribe to Tutorials

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. plz show me my answers
View Tutorial          By: Debnita Saha at 2010-05-01 05:15:16

2. Hi, I have one problem in spinner items. I want to
View Tutorial          By: soodi at 2011-10-18 18:15:58

3. Using HTTP Redirect as per your suggesion, worked
View Tutorial          By: Balram at 2008-03-21 01:27:02

4. good but i needed you to implenent linked list usi
View Tutorial          By: emmanueli at 2011-06-08 10:08:16

5. Can someone tell me how to run in linux 7.10...
View Tutorial          By: fatwa perdana at 2008-10-15 03:27:49

6. i am not getting output by using this code..after
View Tutorial          By: dhaval at 2011-01-03 03:42:28

7. sir , i am new in j2me and i want to learn more s
View Tutorial          By: vipin Luhach at 2012-01-19 06:43:27

8. U did'nt explain super(a,B)
View Tutorial          By: Rafiqullah at 2013-12-16 10:30:41

9. Hi, I second that Raghav, kindly can u email me a
View Tutorial          By: SAM at 2011-03-06 05:03:09

10. Hello,
I've tried the above code, but I've

View Tutorial          By: Phyo Phyo at 2009-09-14 05:32:28