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.

Download:

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.

Installation:
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]
  • javax.comm.properties [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 javax.comm.properties 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








    38 comments:

    1. This comment has been removed by the author.

      ReplyDelete
    2. thanks. i download the api from the website but was lost. thanks again it worked and i tried the sample too and it worked but could you resend the sample code with comments? i am a beginner trying to make sense of the code. i do need some help too with reading and sending sms from a gsm modem. i am at magneto22g@gmail.com . thanks in advance. could

      ReplyDelete
    3. sir i ran the setup successfully ,yet not able to import in eclipse or netbeans....pl help...

      regards
      ankit jolly
      ankitjolly1991@gmail.com

      ReplyDelete
      Replies
      1. Hello troubleseeker

        In my installer i copied the necessary files to JDK not JRE.

        Eclipse and Netbeans use JRE to run java codes.

        So thanks for pointing out the problem.

        I'LL REWRITE THE INSTALLER TO COPY THE FILES TO JRE ALSO AND UPLOAD IT IN A WEEK.

        Regards
        Kishor

        Delete
    4. Hello there

      I want to download the API but megaupload is off --'
      Can you send me by email or other way?


      Thank you

      ReplyDelete
      Replies
      1. Hello Clayton....,
        I'm sorry for not replying for long time.
        Now i uploaded it to MEDIAFIRE...

        Regards

        Delete
    5. Sir,

      I installed it with your installer and also in the manual method. It still doesnt seem to be working and i dont know why. Could you help me out?

      ReplyDelete
      Replies
      1. Hi Deepa..,

        I'll be glad to help.
        Give me some further details.
        Which IDE you are using?[Eclipse? Netbeans? JCreator?]
        which version of JDK you are using?

        Delete
    6. hey....i cannot access the file that you have uploaded on mediafire due to it's download limits on password protected files...
      can you please do the needful....

      Thanking you..:)

      ReplyDelete
      Replies
      1. Hi Shwetha Agarwal.
        Sorry for late reply.
        If you can't download the distribution please mention your email I'll send the it through mail itself.
        or
        you just drop a test mail to my email address kishorbenede@gmail.com.
        I'll surely get back to you.

        Delete
      2. Hi kishor i too couldn't able to download the file. BTW i try to sent a mail to you using above mail address but it says mail address is wrong :(

        Delete
      3. Sorry the correct mail address is kishorbenede15@gmail.com..

        Delete
    7. Hi. I can't access the file through the mediafire link. Could you send me the file via mail? Thanking you very much.. my mail is tobinorozzi@gmail.com. Thank you again!

      ReplyDelete
    8. Earn quick cash from home....http://paid-to-like.com/ref/16235

      ReplyDelete
    9. Hi , can you send the file to andychang21@gmail.com
      Thank you.

      ReplyDelete
    10. Hi , can you send the file to mnmfarhan@gmail.com
      Thank you.

      ReplyDelete
    11. sir hav u written the installer code for jre?? i hv to use netbeans..what should i do for it..as mentioned in above post installation fr jre is different..wat do i do fr netbeans?? pls hlp me out..its urgent

      ReplyDelete
      Replies
      1. Dear krutika..,

        Sorry for not replying instantly. If you are using NETBEANS there is a sperate method to use Comm api.
        Please give me some time of around 26hrs.,i'll figure out a way to use in netbeans.
        I'll surely get back to you as soon as i got the answer.
        In the mean time please state the version of netbeans you are using.

        Delete
    12. its vary useful for beginner, thanks lot, since last many days i was struggling to install api's now i got succeeded

      ReplyDelete
    13. Hi , can you send the file to adribosoftsolutions@gmail.com
      Thank you.

      ReplyDelete
    14. I do not have the jdk folder should i download it?

      ReplyDelete
    15. Hi Kishore ,
      i am using both netbeans as well as Eclipse , but the code seems to not running and also i checked i cant see the jar flle in my Jre folder in eclipse .
      could you please help me out on this ??

      ReplyDelete
    16. how to do in mac any help is appreciated?

      ReplyDelete
    17. This comment has been removed by the author.

      ReplyDelete
    18. What is the password for the rar file?

      ReplyDelete
      Replies
      1. This comment has been removed by the author.

        Delete
    19. i download that zip folder but javax.comm API INSTALLER.exe not in folder

      ReplyDelete
    20. Hi Kishor,
      Code is running fine, but i am getting "time out at setp2" error. Please help

      ReplyDelete
    21. Can't load IA 32-bit .dll on a AMD 64-bit platform

      I am getting this error. can I get a link for downloading 64 bit file.

      ReplyDelete
    22. Can't load IA 32-bit .dll on a AMD 64-bit platform. help plz

      ReplyDelete
    23. What is the password to open zip file

      ReplyDelete
    24. perfect explanation about java programming .its very useful.thanks for your valuable information.java training in chennai | java training in velachery

      ReplyDelete
    25. You're a lifesaver! Thanks!!

      ReplyDelete