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. Thanks
View Tutorial          By: Akhilesh at 2010-04-05 11:31:17

2. Typecasting concept helped me alot in solving my p
View Tutorial          By: Arun at 2010-09-02 00:23:38

3. hi,
i got an exception :in thread mai

View Tutorial          By: N.Venugopal at 2009-08-27 05:25:07

4. hola

no funciona este
Stri

View Tutorial          By: ahmed at 2012-05-11 14:18:46

5. How to use Shift operators with practicals in java
View Tutorial          By: RosyKrish at 2013-01-17 02:42:37

6. Hi Shruti, If you have better samples then feel fr
View Tutorial          By: jagan at 2010-03-03 19:42:46

7. i need some simple java programs
View Tutorial          By: ramya at 2009-11-24 04:25:07

8. Hai.. i tried with d above code but am getting an
View Tutorial          By: muthupandi at 2010-08-17 09:49:23

9. java.lang.IllegalArgumentException
at java

View Tutorial          By: gopal at 2011-03-21 00:45:51

10. Hi,
I'm studying core java.java is new for

View Tutorial          By: shantkumar at 2011-12-01 17:02:26