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. just remember to add
<uses-permission an

View Tutorial          By: Mouad at 2013-07-22 10:47:27

2. Hey, this is a great explanation regarding the dif
View Tutorial          By: foam roofing at 2011-04-02 17:26:52

3. superb superb maza aggaya maza aggaya
View Tutorial          By: pramodh at 2012-04-16 05:21:54

4. aishwarya.. i also have that error.. have you solv
View Tutorial          By: Geok Lin at 2009-04-06 02:26:49

5. @3
argc simply means the argument count.
View Tutorial          By: CDub at 2010-02-22 09:32:54

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

7. good job.thanks
View Tutorial          By: bistrita at 2010-09-09 09:33:31

8. nicely explained :)
View Tutorial          By: ibtisam at 2012-04-26 10:31:58

9. a very good explanation
View Tutorial          By: ramakrishna at 2012-12-20 04:06:12

10. Hi Steve,

thanks for your code. It

View Tutorial          By: Johnny at 2010-10-29 09:25:41