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



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 it really works good
Continue

View Tutorial          By: vipul at 2009-07-14 02:21:18

2. meow is simple and awesome
View Tutorial          By: vishnu prasanth at 2013-01-10 10:00:35

3. Nice stuff u guyzz are sharing
View Tutorial          By: kunal sharma at 2013-11-19 03:45:08

4. This has tread error , copy and paster hole code a
View Tutorial          By: Daniel at 2015-01-21 16:24:36

5. this is the output i get.
Help me.
<

View Tutorial          By: shubham saxena at 2014-04-01 17:06:00

6. Really a appriciatable one. Can u plz send the cod
View Tutorial          By: Jeevan at 2009-04-11 12:39:45

7. simply super post
View Tutorial          By: vinodh at 2010-05-05 00:29:12

8. This is a nice introduction. Thanks a lot.
View Tutorial          By: Provas Kumar Saha at 2010-04-26 02:38:34

9. i want to how to run a package and compile also
View Tutorial          By: sandhya at 2015-06-25 09:04:03

10. This is great, hope to learn more from this commun
View Tutorial          By: Wamaguru at 2014-07-12 09:05:30