Comment on Tutorial - How to Send SMS using Java Program (full code sample included) By Emiley J.
Comment Added by : Ashish
Comment Added at : 2009-03-25 04:28:25
Comment on Tutorial : How to Send SMS using Java Program (full code sample included) By Emiley J.
Hi all this program is working very fine .... i had some doubts as i too have posted one query (199) .. but now i have resolved it and this program is working fine!!! ....thanx for such a good program!! ..
to all people who are having the problem of
javax.comm.NoSuchPortException
first check if ur COM port is really been detected by the driver ( as it was not in my case) ...thats the reason u'll get this problem!!! .. i'll give you one program that will display all the serial and parallel ports in ur system .. just check if ur port is there or not....
/* program*/
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);
}
}
}
just check it ...
this is what the output will be!!( my case)
COM1: Serial
COM2: Serial
COM7: Serial
LPT1: Parallel
LPT2: Parallel
my port is COM7 .. so just check it !!!!
Regards ..... Ashish!!!
View Tutorial
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Related Tutorials
Java program to get location meta data from an image
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
Count number of vowels, consonants and digits in a String in Java
Student marks calculation program in Java
Calculate gross salary in Java
Calculate average sale of the week in Java
Vector in Java - Sample Program
Archived Comments
1. Errm, Rails is just a bunch of Ruby scripts, not a
View Tutorial By: gngn at 2010-07-12 22:19:55
2. in my case the culprit is xdebuger dll version 2.0
View Tutorial By: putra at 2009-12-18 00:39:42
3. Hi, I don't have any GSM modem. Will it work if I
View Tutorial By: Arif at 2008-10-09 11:29:14
4. New thread: Thread[One,5,main]
How is the s
View Tutorial By: Venkatesh at 2013-04-21 07:06:15
5. nice one superb..
View Tutorial By: Rajesh B at 2011-02-01 21:59:56
6. thankssss to prograem
View Tutorial By: maha at 2010-05-21 05:14:36
7. very useful...thank you....
View Tutorial By: jiby at 2012-01-19 06:40:42
8. how to connect jdbc in java on mysql
View Tutorial By: naseem at 2011-10-26 19:26:45
9. 1. Performance
Object pooling provi
View Tutorial By: sonia at 2013-09-21 20:22:49
10. Solution for javax.comm.NoSuchPortException
View Tutorial By: Manjunath Suresh Vaidya at 2011-03-09 04:46:57