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 11:42:07

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. Its so very helpful
View Tutorial          By: Anurag at 2011-02-08 04:27:03

2. this is really very useful because of this site i
View Tutorial          By: meenakshi shukla at 2012-09-15 05:09:49

3. Hi,
My problem is that how to connect the r

View Tutorial          By: Twahie at 2011-03-21 05:31:06

4. i have download the all 5 codes.but how can i run
View Tutorial          By: Chathu at 2011-01-30 02:28:53

5. its very nice
View Tutorial          By: keerthi at 2012-06-28 17:04:36

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

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

7. I like ASP.net b'cs it is very easy to understand
View Tutorial          By: prachi at 2010-06-02 06:04:50

8. Write a program to input the number and use switch
View Tutorial          By: abdulaziz at 2014-03-28 16:22:35

9. Hi ngocanh, You are right. The client has to be in
View Tutorial          By: Emiley J at 2013-07-14 05:51:35

10. Hi mate,
When I compile the DomParserExampl

View Tutorial          By: Suresh Kumar D at 2013-06-25 07:06:19