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. hi,
please anyone tell me how to send bulk

View Tutorial          By: Nasrin at 2012-10-21 18:59:50

2. Hi
I have a USB bluetooth that plug in my c

View Tutorial          By: Duong D. Thien at 2008-06-25 06:09:07

3. how to use tokenizer "No.1 hello,No.2 world,N
View Tutorial          By: saanu at 2011-03-04 00:41:21

4. Hi

I want the java code for i

View Tutorial          By: Deepak at 2015-07-29 15:07:09

5. @ parul : check whether your are passing class fil
View Tutorial          By: heramb at 2012-03-28 07:15:21

6. Hi divya, You will have to edit the SerialParamete
View Tutorial          By: Ramlak at 2008-04-27 05:54:47

7. nice article...........................
View Tutorial          By: abhijit at 2012-09-24 11:12:46

8. i want to know all things about java in a simple w
View Tutorial          By: jayanthi at 2011-12-01 08:08:56

9. nice one.. i lik dis page... very informative for
View Tutorial          By: lokesh at 2013-01-10 09:06:22

10. Hi,
I am using Nokia 3110c connected to PC.

View Tutorial          By: Satish Raj at 2009-04-04 07:32:54