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. great explanations.. some important words are miss
View Tutorial          By: Joshua Paul at 2015-04-14 03:43:44

2. Nice one....
View Tutorial          By: vinod at 2010-05-06 23:36:15

3. u hav done Nice job..
View Tutorial          By: Rakesh at 2012-10-01 16:00:14

4. This is an excerpt from Java Complete Reference.Ju
View Tutorial          By: Guest at 2010-03-25 01:36:57

5. Please, I need help, how can i write a program &qu
View Tutorial          By: LULU at 2012-11-23 01:34:07

6. ei! its me again..i badly need you help coz we are
View Tutorial          By: anne226 at 2009-02-11 10:24:21

7. Hi,
I want to read the barcode and print it

View Tutorial          By: Santu at 2013-03-12 18:15:18

8. Good introduction to a valuable topic
View Tutorial          By: Elayaperumal at 2011-07-18 12:48:15

9. i'ma beginer in this android devopment tutorial ca
View Tutorial          By: vijay at 2015-08-18 05:16:54

10. Can you explain with increment and decrement opera
View Tutorial          By: Sathish Kumar at 2013-09-01 07:40:42