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. very nice
View Tutorial          By: Md Irshad Alam at 2014-10-29 18:58:53

2. i want full material of java with ds
with

View Tutorial          By: madhulatha at 2009-02-01 16:49:22

3. when i tried this code i couldnt run the program..
View Tutorial          By: kavitha at 2009-11-28 01:38:55

4. It is a good tutorial but I think the "Instru
View Tutorial          By: Jaypee at 2010-10-10 22:40:50

5. Bad article ! What about the explanation of Messag
View Tutorial          By: Manish at 2011-05-24 04:44:03

6. Hi this is very clear and helpful, I would like to
View Tutorial          By: JoelC at 2012-11-06 16:23:19

7. Hi..thx for the hadoop info..i m learning hadoop..
View Tutorial          By: Kirti at 2015-10-26 11:42:02

8. hay is there any way to perform operation or calcu
View Tutorial          By: neha at 2009-11-20 08:29:45

9. For me it is executing without error, But not send
View Tutorial          By: Vijay at 2011-02-19 01:51:08

10. i don't understand the input attributes can u plea
View Tutorial          By: dhanalakshmi at 2011-05-05 07:10:25