You can use this free Java sample program to send SMS from your PC using GSM modem connected to your computer to your COM port. To do this first of all you have to install the java communication API (comm API) in the windows environment.



How to install The Java Communications API in a Windows Environment?

There is a trick to install the Java Communications API correctly on a Windows system Machine. The following files are the core of JAVA Communiccation API, and they are very important to have them installed on your system for a proper operation.

comm.jar
win32com.dll
javax.comm.properties

For the jdk (Java Developnment Kit) to recognize the serial ports on your machine, it is important to properly place these files in the right folders on your local machine :

%Java_HOME% = the location of your jdk directory.
%windir% = the location of your Windows directory.


To Find your JDK directory, Use the Following steps:

1. Click on Start
2. Click on Search
3. Click on For Files or Folders
4. In the Left hand Side, Click on All Files and Folders
5. Type in jdk* in the textbox under All or part of the file name:
6. Click Search
7. Look for yellow icon that looks like a folder
8. Double Clikc on the folder to open the jdk folder

  • comm.jar should be placed in:
                                   %JAVA_HOME%/lib

                                   %JAVA_HOME%/jre/lib/ext

  • win32com.dll should be placed in
                                  %JAVA_HOME%/bin

                                  %JAVA_HOME%/jre/bin

                                  %windir%System32

  • javax.comm.properties should be placed in:
                                %JAVA_HOME%/lib

                               %JAVA_HOME%/jre/lib


How to send SMS using Java ( Part I )
How to send SMS using Java ( Part II )

Popular Posts

Labels

Latest Comments

Blog Archive

Followers

Total Pageviews