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



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. I running this on localhost offline and getting er
View Tutorial          By: nitisha at 2011-05-14 09:18:16

2. Its informative and helpful. Thanx
View Tutorial          By: Usama at 2012-07-14 22:16:45

3. Thanks a lot for the code...
thats working

View Tutorial          By: Rahul at 2008-06-28 14:16:10

4. Hi, please do you know how can i use a cel connect
View Tutorial          By: nobody at 2010-04-06 20:25:54

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

6. hi,
thier is an error coming with me when i

View Tutorial          By: Tarun at 2013-02-17 03:13:21

7. Hi,
can anyone show or send me a sample pro

View Tutorial          By: jsn10 at 2011-09-14 05:41:03

8. i am using tata photon+ modem ,so which csca numb
View Tutorial          By: ganesh at 2011-01-30 12:11:01

9. Great example - easy to understand!
View Tutorial          By: George at 2009-12-30 03:48:37

10. Very Very nice explanation...
View Tutorial          By: anil at 2010-11-04 00:22:58