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. Whenever i run this program, it terminates immedia
View Tutorial          By: Gopi at 2015-08-19 06:55:41

2. Hi,
Even if the while loops (in Producer an

View Tutorial          By: Pranay at 2012-09-19 19:08:45

3. hi,
can you tell me how to run the code to

View Tutorial          By: raghu at 2008-12-26 03:15:52

4. Daniel Jonsson, you should be thankful to this art
View Tutorial          By: dole at 2011-11-12 06:44:42

5. awesome...its very understandable one..thnq..:)
View Tutorial          By: sharan at 2010-02-08 10:58:17

6. Hi,

Your COM port is currently in u

View Tutorial          By: Ramlak at 2008-04-14 07:29:55

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

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

8. very helpful.
View Tutorial          By: arjun at 2011-07-19 03:19:44

9. i wish to get some example java programs to unders
View Tutorial          By: rebecca at 2010-01-09 03:14:42

10. I want to redirect from a servlet page to another
View Tutorial          By: dinesh at 2014-10-20 16:44:26