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. Can you provide some more specific application of
View Tutorial          By: Rushikesh at 2012-01-15 18:23:36

2. it is super
View Tutorial          By: vinod at 2011-09-03 04:06:02

3. thank for this
View Tutorial          By: ankit at 2011-07-15 06:48:21

4. The Given Programms are not suitable for "How
View Tutorial          By: Rams at 2009-01-27 01:36:16

5. Hi friends i have one problem am register one form
View Tutorial          By: Inbaraj at 2014-07-04 05:28:55

6. very good....
View Tutorial          By: satish at 2010-03-03 22:47:25

7. Hello, I have executed the above code and it works
View Tutorial          By: Sana at 2010-02-01 03:49:44

8. works for me - thanks !!!!!
View Tutorial          By: Vaneeza at 2011-12-19 17:06:09

9. it is very good for best practice of basics.......
View Tutorial          By: sushil ghimire at 2015-03-01 13:27:57

10. it help me lot 2 understand what is struts-config
View Tutorial          By: Amit Tomar at 2010-11-27 09:27:15