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,
I done very simple, just copy the strut

View Tutorial          By: sridhar at 2009-03-01 19:17:10

2. Not able to store on SD card.But storing on phone
View Tutorial          By: kusuma at 2015-07-25 13:42:17

3. Thks a lot..... The way of giving explanation and
View Tutorial          By: Hari at 2011-04-08 02:58:06

4. hi,
while exporting data i am getting error

View Tutorial          By: akash at 2011-12-22 07:28:05

5. Sir, can you give me an example of Isalnum in java
View Tutorial          By: Angeline at 2011-07-13 06:43:54

6. how to show text in tab menu & when i selected
View Tutorial          By: shadah at 2012-05-05 14:14:37

7. wow...great MAN
View Tutorial          By: Er Sounderarajan at 2013-03-13 07:29:58

8. Your program contains only data retrieval command.
View Tutorial          By: Govindarajan at 2012-02-08 01:02:01

9. How do i get tht GSM Connection .Can any one give
View Tutorial          By: srinivas raju at 2008-08-08 02:50:02

10. This is probably a good java tutorial but it made
View Tutorial          By: lol at 2012-09-15 21:20:09