Wednesday, May 4, 2011

How to install The Java Communications API(javax.comm) in a Windows Environment

Hi Every one....,
In this post I'm gonna tell you how to install Java Communication API on Windows Operating System.
Well every one of us Java Programmers may come across in our career to read Data From or Write Data to Serial Port devices like : GSM modem, RFID Reader and some other devices that specifically made to Serial ports.
So in that case we need to install Java communication API manually along with our respective JDK's .
Here are some steps explained Where to Download this API and How Install.


You can get This Api any where by just Googling it.
But it comes with Bunch of files which you need to copy into several respective location on your PC that's quite creepy thing, i guess...
So I've wrote small simple Installer Which will do all those creepy thing for you people.
The Download link is:

Password: javax.comm

The rar archive contains Installer an Api as well.

Once you download this File you will get a rar File named "javax.comm.rar".
Unzip it with the password that i provided above.
You'll get a Folder named javax.comm.
Inside that Folder you Will see
  • comm.jar                     [Part of API]
  • [Part of API]
  • win32com.dll               [Part of API]
  • javax.comm API INSTALLER.exe [Simple Installer That I wrote]
  • RADME.txt and [Instructions to install Manually, IN CASE THE INSTALLER FAILS)]
  • Sample code to Read from Serial Port(No mater Which Device it is)
Double Click on the Installer [ javax.comm API INSTALLER.exe ], it will install API for itself.

[*Note: Do not move the Installer(javax.comm API INSTALLER.exe) out of the folder, coz i wrote it copy the files from current folder. So it ain't get installed if Do so]

Manual Installing Instructions (In case if downloaded API from other site or if you lost the README.txt filr above mentioned)

Installation consists of 3 Phases:

Phase1:- Copy comm.jar to

  •  %JAVA_HOME%/lib   
[ In my case C:\Program Files\Java\jdk1.6.0\lib ]
  • %JAVA_HOME%/jre/lib/ext
[ In my case C:\Program Files\Java\jdk1.6.0\jre\lib\ext ]

Phase 2:- Copy win32com.dll to

  •  %JAVA_HOME%/bin
 [ In my case C:\Program Files\Java\jdk1.6.0\bin ]
  •  %JAVA_HOME%/jre/bin
 [ In my case C:\Program Files\Java\jdk1.6.0\jre\bin ]
  • %windir%System32
[ In my case C:\Windows\System32

Phase 3 : Copy to
  • %JAVA_HOME%/lib
  [ In my case C:\Program Files\Java\jdk1.6.0\lib ]
  • %JAVA_HOME%/jre/lib
     [ In my case C:\Program Files\Java\jdk1.6.0\jre\lib

    That's It Lads:)
    Enjoy | Have a Great Time | By KISHOR