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



Comment Added by : pablo

Comment Added at : 2014-08-03 16:10:55

Comment on Tutorial : How to Send SMS using Java Program (full code sample included) By Emiley J.
I am receiving an error as
Error java.lang.NullPointerException
The code is

package p1;
import javax.comm.*;
import p1.SMSClient;
public class test{

private static int sendMessage;

/**
* @param args
*/
public static void main(String[] args) {
try{
SMSClient obj=new SMSClient();
int n=obj.sendMessage("9062322456", "test");
}
catch(Exception e){System.out.println("Error " +e);}

//Error java.lang.NullPointerException
}
}


I would also like to knwo where is the smsc number in these four files and where can i find it in ??
Is it the operators code??


View Tutorial



Ask a Question

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. Nice code easily understand the code and useful
View Tutorial          By: satish at 2010-01-22 06:30:22

2. how to display images in j2me?? thank you :)
View Tutorial          By: bill at 2011-06-23 23:59:41

3. sir i want to knw abt all simple java programs pls
View Tutorial          By: sakthi at 2011-08-29 14:06:10

4. Nice one. I havn't thought of this before.
View Tutorial          By: Aniket Sawant at 2013-04-09 05:40:58

5. Unable to connect with https:\\localhost:8443 but
View Tutorial          By: gopala krishna at 2012-04-02 07:17:09

6. simple examples that i can understand ,.,,by the w
View Tutorial          By: Chriskuang at 2015-03-19 03:05:59

7. Dude I want to send sms using GSM Mobile connected
View Tutorial          By: Funmarkaz at 2009-08-23 02:59:50

8. The basic structure of simple program is used to l
View Tutorial          By: Muthusasi at 2009-12-17 21:10:01

9. Can you send me the full code for sending sms usin
View Tutorial          By: Tamizh chelvam at 2014-03-24 17:30:52

10. Dear Friends, I get the following exception...

View Tutorial          By: NT.Jay at 2011-10-06 05:33:09