Comment on Tutorial - How to Send SMS using Java Program (full code sample included) By Emiley J.

Comment Added by : pradeep kumar mohapatra

Comment Added at : 2010-06-25 04:30:49

Comment on Tutorial : How to Send SMS using Java Program (full code sample included) By Emiley J.
Thank you very much for this code,It is woking perfectly in NetBeans and also in command prompt.
Just change the csca number to message center number of your mobile from which you want to send the message and change the port number in the " private SerialParameters defaultParameters = new SerialParameters("COM1", 9600, 0, 0, 8, 1, 0);" change COM1 to your port number. and write these codes in the main class

public class MyClass {

public static void main(String args[]) throws Exception {
System.out.println("enter the recipients mobile number");
BufferedReader br=new BufferedReader(new InputStreamReader(;
String s1 =br.readLine();
System.out.println("enter the message");
BufferedReader br1=new BufferedReader(new InputStreamReader(;

String s2 =br1.readLine();
SMSClient sc = new SMSClient(1);
sc.sendMessage(s1, s2);


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. can you please explain this..!!

t =

View Tutorial          By: kalyan at 2011-06-30 00:01:10

2. required the flag set loop stutruce .............
View Tutorial          By: savita at 2013-05-12 04:52:30

3. This will give the output check it out

View Tutorial          By: shruthi at 2013-01-18 06:00:08

4. Hi Jim, to get the code for this clock, right clic
View Tutorial          By: Rajan at 2008-04-11 08:25:03

5. This example is very clear. I cleared my concept o
View Tutorial          By: sukanta at 2009-10-20 06:08:50

6. Hello! May I know where is the "main" fu
View Tutorial          By: Angelia at 2009-06-25 18:54:28

7. Hi, I am getting following exception while running
View Tutorial          By: Vasundhra at 2008-06-24 07:04:42

8. hi issac thank you for your sample. can you please
View Tutorial          By: edwin at 2009-05-20 22:04:14

9. if done all the steps but i have found out this er
View Tutorial          By: hisham at 2010-11-24 11:01:54

10. Excellent !!!
Never thought about it...

View Tutorial          By: RahulC at 2012-07-03 11:36:57