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. @pankaj because u need to cast it. when u add num
View Tutorial          By: raziq at 2011-12-18 16:06:09

2. Thank you so much Eric Giguere.
You save me

View Tutorial          By: ijAcK D at 2009-10-18 05:02:48

3. Good and optimum introduction to J2ME application
View Tutorial          By: [email protected] at 2013-01-14 10:37:57

4. hi I want to send SMS to mutiple no.s. Is it possi
View Tutorial          By: gaurav at 2011-05-17 09:54:12

5. </application>
<uses-permission an

View Tutorial          By: saurabh at 2012-01-17 05:00:21

6. Having this error while using comm.jsr for sending
View Tutorial          By: Amit Kumar at 2013-10-15 09:04:58

7. Thank you for this tutorial. Thank you all the mor
View Tutorial          By: sd at 2013-09-09 05:38:52

8. I do my projest in j2me.so please send me your ide
View Tutorial          By: sivasakthivel.s at 2011-06-22 13:26:54

9. Can u plz send me woking application (Send sms) J
View Tutorial          By: Ritanshu Goel at 2012-09-22 05:53:24

10. i avinash can i know how ur problem is resolved ,i
View Tutorial          By: santosh at 2011-12-06 10:35:42