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



Ask a Question

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. i fixed it already...

how can I get

View Tutorial          By: kathleen ashley at 2010-08-08 04:51:26

2. I'm trying to follow this backward, but I can't fi
View Tutorial          By: DMM at 2014-03-14 21:42:06

3. No use of this example.
I was searching oth

View Tutorial          By: Karan at 2010-04-10 05:41:47

4. these tutorials are very simple to understand. I
View Tutorial          By: sagar at 2009-05-09 23:31:01

5. hello, please i need a help.. i'm trying to make a
View Tutorial          By: Ludmila at 2012-12-10 17:56:00

6. Thanks for your code. Nice working but I have one
View Tutorial          By: Ravinder Kumar at 2012-01-02 18:01:21

7. Can some body throw more light on TRANSIENT ....
View Tutorial          By: Anish at 2010-08-03 07:30:58

8. thanx nice explanation...
View Tutorial          By: vignesh at 2012-07-15 20:12:22

9. hope this may help u

class product<

View Tutorial          By: princess at 2011-11-30 12:11:57

10. Great!!!!!!!!!!!!!!!!!!!!
View Tutorial          By: Raghbendra Nayak at 2012-03-28 12:54:35