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.
View Tutorial          By: pmprash at 2009-12-22 01:15:33

2. ... it is nice site coz 8 can help students lyk me
View Tutorial          By: mayflor at 2011-06-29 03:57:51

3. Can u tell it can also use for connecting to oracl
View Tutorial          By: Ankur Jain at 2010-08-06 05:31:08

4. @pooja: this method should work, although i'm sure
View Tutorial          By: Anush at 2012-07-16 08:30:58

5. thank u. it is very useful for users
View Tutorial          By: c.balasubramani at 2008-09-24 03:55:47

6. thanks for all thanks for your help good bye
View Tutorial          By: ARAS at 2010-05-14 06:50:47

7. Thank you for Very good article.
View Tutorial          By: Pakornsak S at 2010-02-08 04:35:05

8. hey usharadha and all other friends...i hv taken a
View Tutorial          By: abdur at 2012-02-03 15:56:10

9. nice one dear
View Tutorial          By: pradeep at 2010-02-15 07:00:35

10. Hi, i am new java, and i want to become gud develo
View Tutorial          By: amit at 2012-02-16 12:21:25