Naeem
Naeem

Reputation: 36

simple program of java to comminucate with usb port

Currently I am accessing usb port using dll file in C++.I want to achieve same functionality in core java(Not using JNI).Can some one provide me any simple tatourial for how to read data from USB port. I am using windows 7 for my development and NetBeans IDE.

I had seen How to access USB ports in java but it seems to be little outdated.

Upvotes: 0

Views: 1005

Answers (1)

garzanti
garzanti

Reputation: 2190

First of all you need some technical background about USB, hardware and software. With USB there are no Rx/Tx lines, just "one line" over two wires with differential electric transmission.

About your initial question the response is that you cannot write a pure Java implementation. You have to interact with the driver, which is written in C, so you will have to use JNI.

Upvotes: 3

Related Questions