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



Comment Added by : jainitya

Comment Added at : 2011-05-04 12:26:16

Comment on Tutorial : How to Send SMS using Java Program (full code sample included) By Emiley J.
Hi Ramlak
I am trying to run your code.
I have created a SMSTest.java to get an object for SMSClient
public class SMSTest {
public static void main(String[] args) {
// TODO Auto-generated method stub

String Tonumber = "09560341246";
String msg="hifsdf244";
SMSClient sms=new SMSClient(0);
sms.sendMessage(Tonumber,msg);
}
}

Change the Port number and csca, but anable tosend my SMS and getting error msg as
java.lang.NumberFormatException: For input string: "df244"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:403)
at java.lang.Long.parseLong(Long.java:461)
at Sender.run(Sender.java:159)
at java.lang.Thread.run(Thread.java:619)
Wed May 04 20:59:45 IST 2011:Sender:*** time out at step 6***

If I changed the msg to number as msg=1355244
then I am getting a message as
recipient: 09560341246 message: 1355244
sending ...
messageNo244
Wed May 04 21:09:42 IST 2011:Sender:sent message no:244
but still it did not send any SMS.

Please suggest
Thanks


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 a lot............
View Tutorial          By: mks at 2013-01-03 06:50:05

2. how doeas peek work in a c++ program
View Tutorial          By: odwa at 2008-02-29 02:44:19

3. Hi Ramlak,
I am using jdk1.4.2 to run the a

View Tutorial          By: mounika at 2008-04-27 03:05:36

4. unzip jquery-ui-1.10.3.custom

and c

View Tutorial          By: ajmal at 2013-06-06 10:44:55

5. Here i posted a good example with spring. Here rea
View Tutorial          By: Vikash K Agarwal at 2011-11-02 12:02:50

6. And how did you do that ?
Can you share it

View Tutorial          By: Arsenio at 2009-07-18 23:01:00

7. thanks emily, this was fantastic... just saved me
View Tutorial          By: philip at 2010-04-10 20:39:08

8. wonderful
simplified description
ke

View Tutorial          By: ephrem at 2010-01-14 06:12:05

9. sir how can i access url in one click
View Tutorial          By: mohit at 2010-05-28 23:10:23

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