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



Comment Added by : Purushothaman

Comment Added at : 2009-04-10 07:18:38

Comment on Tutorial : How to Send SMS using Java Program (full code sample included) By Emiley J.
Thank you, Every thing is working fine...!!

Sandeep
try this code to find your system ports, and use available ports on sender.java

import javax.comm.*;
import java.util.Enumeration;

public class ListPorts {
public static void main(String args[]) {
Enumeration ports = CommPortIdentifier.getPortIdentifiers();
while (ports.hasMoreElements()) {
CommPortIdentifier port = (CommPortIdentifier)ports.nextElement();
String type;
switch (port.getPortType()) {
case CommPortIdentifier.PORT_PARALLEL:
type = "Parallel";
break;
case CommPortIdentifier.PORT_SERIAL:
type = "Serial";
break;
default: /// Shouldn't happen
type = "Unknown";
break;
}
System.out.println(port.getName() + ": " + type);
}
}
}

UU,

i suggest you to try the at commands at sender.java on hyperterminal.

may be issue with the SMSC number.

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. Microsoft VB.net 2008 not showing Crystal Report V
View Tutorial          By: Ali at 2011-11-30 03:21:00

2. Wow, damn nice. It does everything, and the script
View Tutorial          By: Ethan Windsor at 2012-06-14 13:47:39

3. Ok, now I get it. New to Java and it just didnt ge
View Tutorial          By: izdelava strani at 2011-12-16 09:42:51

4. Can you Please send me the code for movable clock
View Tutorial          By: Rajagopal at 2008-09-29 23:10:57

5. really superb in simple english with examples. Exp
View Tutorial          By: hariharan at 2009-01-14 22:22:32

6. I had downloaded all 5 the file
but i need

View Tutorial          By: Dhananjay at 2009-12-09 10:20:30

7. Thanx.. it helps me a lot, now.. i have 1 more que
View Tutorial          By: GuzZpaWn at 2012-01-15 17:19:29

8. i need scjp questions and information
View Tutorial          By: raja at 2010-03-29 08:05:35

9. How to send to multiple mobiles at a time
View Tutorial          By: rakesh at 2010-04-30 10:33:51

10. Excellent.
Just one question... What is the

View Tutorial          By: HeilGates at 2010-08-04 13:38:12