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 sir
how can i get started if i want to

View Tutorial          By: simiyu at 2014-03-15 09:13:04

2. Lots of thanks for this example
View Tutorial          By: Santosh at 2011-06-28 16:42:25

3. Hi,
I want to run a bat file, below are the

View Tutorial          By: Rajshekar at 2011-10-28 06:07:06

4. This is very helpfull to us.........thnq
View Tutorial          By: lavanya at 2012-03-17 05:43:12

5. How about using stack in microprocessor subj.??? d
View Tutorial          By: Private at 2015-08-18 01:43:18

6. Error loading SolarisSerial: java.lang.Unsatisfied
View Tutorial          By: Rahul at 2008-09-09 04:05:35

7. A big thanks to Ramlak for the detailed and crisp
View Tutorial          By: Chidanand Gangur at 2009-08-27 06:02:16

8. when i try to compile the two files by executing t
View Tutorial          By: Brian at 2015-08-05 12:15:37

9. i appreciate the article for being straight to the
View Tutorial          By: shey-poun at 2011-12-14 06:39:51

10. Thank You
View Tutorial          By: Alex at 2011-02-09 04:26:07