Results 1 to 3 of 3
  1. #1
    Dogge is offline Member
    Join Date
    Feb 2008
    Posts
    1
    Rep Power
    0

    Default Reading from Serial port!

    Hello.

    Im trying to make a basic program that reads from the COM1 serial port. Ive tried getting the javax.comm API but it seems Sun has disscontiued it for Windows.
    Tried gettign the rxtx API aswell but all their downloads from their site are corrupted.

    I also got hold of an older version of the Comm API (2.0 i belive) but i couldnt get it to run.
    Ive tried looking everywhere but i couldnt find anything to help me.

    The program i want is something really basic which is gonna read bacicly if the serial port has a 1 on it (its connected to a PIC processor) and then count +1 to a number. I want to use java since im building a Graphics interface to go along with it.

    Anyone have a simple tutorial or something that could help me out, im running on a Win XP machine.

    Or is there maybe someway to get the data from the hyperterminal instead of directly from the serialport?

  2. #2
    baloda is offline Member
    Join Date
    Nov 2010
    Location
    New Delhi
    Posts
    50
    Rep Power
    0

  3. #3
    Singing Boyo is offline Senior Member
    Join Date
    Mar 2009
    Posts
    552
    Rep Power
    6

    Default

    If you can do it from C/C++ code, you could use the JNI (Java Native Interface). That link is very detailed, so you might also want to google it. (Sorry, couldn't resist. Haven't used LMGTFY in too long)
    If the above doesn't make sense to you, ignore it, but remember it - might be useful!
    And if you just randomly taught yourself to program, well... you're just like me!

Similar Threads

  1. Serial Port
    By radhika in forum New To Java
    Replies: 5
    Last Post: 11-06-2009, 10:40 AM
  2. Accessing Serial port using JDK 1.6
    By hasani6leap in forum Advanced Java
    Replies: 5
    Last Post: 01-24-2009, 03:23 AM
  3. Access Serial port
    By hasani6leap in forum Advanced Java
    Replies: 0
    Last Post: 02-12-2008, 09:45 AM
  4. Writing to serial port (com1)
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-05-2008, 09:02 AM
  5. serial port
    By musiigedeo in forum Advanced Java
    Replies: 0
    Last Post: 07-23-2007, 04:52 PM

Posting Permissions

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