Results 1 to 14 of 14
Like Tree1Likes
  • 1 Post By JosAH

Thread: Java Serial Port communication

  1. #1
    Khan05 is offline Member
    Join Date
    Jul 2011
    Posts
    27
    Rep Power
    0

    Default Java Serial Port communication

    Hi Everybody,
    I am in new to Java. I am doing a project how to read and write data with serial port. I am trying to java comm API. I don't know hot download and how to set up path. Also please let me know how to use Java Comm API in elipse? Do I have to do some thing different to import java Comm API in eclipse. Please help me I will really appreciate.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,771
    Blog Entries
    7
    Rep Power
    21

    Default

    The Java comm extension has been discontinued for MS Windows; there is a replacement (it's free): http://rxtx.org; all the details are in the installation notes, read them.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    Khan05 is offline Member
    Join Date
    Jul 2011
    Posts
    27
    Rep Power
    0

    Default

    I tried but Couldn't get it. Please could you tell me step by step for wind 7 64 bit. I will appreciate.
    Thanks

    Khan

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,771
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Khan05 View Post
    I tried but Couldn't get it. Please could you tell me step by step for wind 7 64 bit. I will appreciate.
    Use this link instead; they must've stopped their old url address.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    Khan05 is offline Member
    Join Date
    Jul 2011
    Posts
    27
    Rep Power
    0

    Default

    I download but could you give me step by step description to set up and either eclipse IDE
    . I really need it. I will appriciate.

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,771
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Khan05 View Post
    I download but could you give me step by step description to set up and either eclipse IDE
    . I really need it. I will appriciate.
    You don't need to do anything special for Eclipse; just store the .jar file in your JRE/lib/ext directory; the API documentation for Sun's javax comm applies here one to one because the APIs are identical. The rxtx package also comes with documentation, why not read it?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    Khan05 is offline Member
    Join Date
    Jul 2011
    Posts
    27
    Rep Power
    0

    Default

    Yes I did copied jRe/lib/ext. But still when I typed in eclipse (" import javax.comm.*;) it doesn't work. I am using window 7 64 bit. Please reply to me.

    Thanks

    Khan

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,771
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Khan05 View Post
    Yes I did copied jRe/lib/ext. But still when I typed in eclipse (" import javax.comm.*;) it doesn't work. I am using window 7 64 bit. Please reply to me.
    But of course, how silly of me to assume that you'd read the accompanying documentation: those classes are in the gnu.io package not in the javax.comm package.

    Jos
    Fubarable likes this.
    cenosillicaphobia: the fear for an empty beer glass

  9. #9
    Khan05 is offline Member
    Join Date
    Jul 2011
    Posts
    27
    Rep Power
    0

    Default

    He Joash. I really appriciate your effort. But I still not getting how to import javax.comm.*; and what is gnu.io. how to use it. Please help me. Give me step by step please.

  10. #10
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,771
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Khan05 View Post
    He Joash. I really appriciate your effort. But I still not getting how to import javax.comm.*; and what is gnu.io. how to use it. Please help me. Give me step by step please.
    You can't import javax.comm.* classes because they are not there. The rxtx package stores its classes in package gnu.io so you should do "import gnu.io.*".

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  11. #11
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    I don't think they'll be happy until you've written all the code for them...

  12. #12
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,771
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Tolls View Post
    I don't think they'll be happy until you've written all the code for them...
    This thread is driving me nuts (if I wasn't completely insane already ;-) It's as if they don't read my replies and keep on doing stuff they're not advised to do ... I realize that the rxtx documentation is a bit scattered over the net but that's nothing Google can't solve.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  13. #13
    Khan05 is offline Member
    Join Date
    Jul 2011
    Posts
    27
    Rep Power
    0

    Default

    Thanks a lot Josh. Now I can import. using gnu.io.*. I really appreciate it.

    Thanks.

    Khan

  14. #14
    Join Date
    Oct 2012
    Posts
    1
    Rep Power
    0

    Default Re: Java Serial Port communication

    hello sir i cant get proper steps of serial port example and to use javax.comm api in our example and where to use it please help me

Similar Threads

  1. Serial port Communication Problem
    By rjagan in forum New To Java
    Replies: 8
    Last Post: 04-20-2011, 01:36 PM
  2. Serial port communication via jSSC
    By scream3r in forum New To Java
    Replies: 5
    Last Post: 02-15-2011, 09:12 PM
  3. Replies: 1
    Last Post: 07-30-2010, 09:29 AM
  4. serial port communication in java
    By elsanthosh in forum New To Java
    Replies: 2
    Last Post: 04-06-2010, 07:33 PM
  5. Usage of Serial Com Port communication
    By calvinlyp in forum New To Java
    Replies: 0
    Last Post: 02-19-2010, 07:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •