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. hi..i can send 4 or 5 sms per mnt..is there any wa
View Tutorial          By: rahul at 2011-02-11 00:17:51

2. Hi guys... I try to run the program and I got this
View Tutorial          By: Glatiuden at 2015-01-31 02:42:37

3. Thank You So Much . .. .. .
Very Nice Expl

View Tutorial          By: salman at 2012-07-05 13:22:11

4. hi i want to run a c program in java program but i
View Tutorial          By: jyothi at 2014-11-27 06:40:27

5. Thanks to OP and Zarno for finishing off this code
View Tutorial          By: Soapy Balls at 2011-05-27 05:26:13

6. Hi,
I wann to insert data into excel file b

View Tutorial          By: PRUTHVIRAJ RATHOD at 2011-05-23 11:42:14

7. This is very useful for java beginners
View Tutorial          By: Syed Musthafa at 2011-11-20 07:11:50

8. @ Qui:

You can set the CSS Style:
View Tutorial          By: hache at 2010-06-22 02:02:56

9. Small modification.
System.out.println(&qu

View Tutorial          By: Rohit at 2012-02-07 16:22:52

10. Hi
Thankyou for your code. Its good.

View Tutorial          By: Rajeshkumar at 2010-01-29 22:34:17