Skip to main content

Usb support (especially for windows)

15 replies [Last post]
victorsosa
Offline
Joined: 2004-09-16
Points: 0

I think, we need in java SE 6 support for USB, Firewire and bluetooth, many device used especially USB to make comunication like card reader, storage device, etc. (Now I am trying to comunicate to a usb device, but I have many problem and especially for Windows Xp)

I saw jrs-80 and jusb, and both work with linux, there is one jusb for windows but is very unestable and beta api.

I think we need urgent a api for usb, bluetooth and firewire, because more a more device come with this technology (mobile device especially) and if java want would be still with the new innovation.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
lucasf
Offline
Joined: 2010-05-07
Points: 0
vikyjavadeveloper
Offline
Joined: 2009-03-25
Points: 0

hi
i am a java developer but i don't communicate with USB API in java
so please help me for read and write some date into usb device with
the help of JUSB API..

ewin
Offline
Joined: 2005-07-15
Points: 0

> hi
> i am a java developer but i don't communicate with
> USB API in java
> so please help me for read and write some date into
> usb device with
> the help of JUSB API..

The best advice to give to you is to change the language. Change from Java to a language that is well integrated with your operating system. A language that provides direct access to the APIs provided by your operating system.

When it comes to communication with devices (serial, parallel, USB, whatever), then Java SE is a PoS. There were hundreds of promises from Sun over the years to get it right. They were all broken.

ashiraz
Offline
Joined: 2008-12-27
Points: 0

It is important that we have SOMETHING tangible and easy to use which allows java to interact with hardware easily. This is important because Java purports to replace the OS and the underlying hardware (it is a virtual machine) and most virtual machines have support for usb devices and hardware and lower layers (even virtual ports and nets). Only an employee of MS would say "let us not have such functionality in java".

As far as I can tell none of the aforementioned options are even remotely usable or attractive. Linux as an OS is simply unusable for the general populace. With the exception of the arrogant and self important geek no lay consumer would touch linux with a ten foot pole. We need a better OS to replace or excel or compete with MS but we cannot stifle java's functionality ... come on people !

cowwoc
Offline
Joined: 2003-08-24
Points: 0

I agree, Java needs a solid USB library regardless of whether it is part of the core API or not. The fact that USB support is so poor is locking Java out of many embedded applications.

marcb
Offline
Joined: 2005-04-18
Points: 0

You can try USBIO from TheSyscon which provide generic USB read/write drivers for Windows and a JNI lib. It's commercial and fairly expensive, but there's a free demo available.

To me, USB support should come (and does come) through the OS for standard USB device classes such as mass storage and mice/keyboard. But when you're creating/using a custom peripheral device with its own little communication protocol, you need to be able to use USB as a generic read/write communication channel. JSR-80 is very complete/complex and that's why there's no real implementation out there: it's just a lot of work!

If we could have a cross-platform implementation, with platform specific drivers that allowed us to simply discover USB devices and create an InputStream and OutputStream (or a channel) to them, even for simple BULK transfer, this would open up a huge number of possibilities.

Serial port communication use to fill this need (and Serialio has a usefull library for Java, much better than Sun's javax.comm), but nowadays RS-232 is just disapearing. Can't we start with just basic USB connectivity?

Just my 2 cents, I've been waiting for some kind of USB support in Java for a few years now...

Cheers!
Marc

cpparkin
Offline
Joined: 2006-04-25
Points: 0

For a USB API for Windows see http://www.icaste.com

bantunes
Offline
Joined: 2003-06-11
Points: 0

You can try this old code:

jUSB: Java USB
http://jusb.sourceforge.net/

jUSB: Java USB for Windows:
http://www.steelbrothers.ch/jusb

java@ibm: Access USB devices from Java applications
http://www-128.ibm.com/developerworks/java/library/j-usb.html

--
Bruno Antunes,
Java Software Engineer

bantunes
Offline
Joined: 2003-06-11
Points: 0

JSR 80 - Java USB API
http://www.jcp.org/en/jsr/detail?id=80

JSR 80 - javax.usb (Reference Implementation)
http://javax-usb.org/

--
Bruno Antunes,
Java Software Engineer

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

Wrong - you urgently need an api for accessing those interfaces, not we.

In my opinion I think such APIs should be not deployed as part of the default java distribution(aka JRE), there are some external projects working on this (with some of them beeing commercial).
Stuff like usb storage-devices und bluetooth-stuff should be suppported by the underlaying OS anyhow.

lg Clemens

prunge
Offline
Joined: 2004-05-06
Points: 0

> Stuff like usb storage-devices und bluetooth-stuff
> should be suppported by the underlaying OS anyhow.

Exactly right. Having low-level USB access from Java is similar to having direct access to the physical layer on network cards or directly accessing the SCSI bus.

You don't need direct USB access to use card readers or USB mass storage devices - that should be handled by the OS. You should be able to simply create a file in the appropriate section of the file system, write to it, and the OS should take care of the rest.

mthornton
Offline
Joined: 2003-06-10
Points: 0

> > Stuff like usb storage-devices und bluetooth-stuff
> > should be suppported by the underlaying OS anyhow.
>
> Exactly right. Having low-level USB access from Java
> is similar to having direct access to the physical
> layer on network cards or directly accessing the SCSI
> bus.

For storage or network devices I would agree. However USB is also being used for purposes where serial and parallel interfaces were previously used such as instrumentation control or even model railways. We aren't going to get OS supported high level api's for all such purposes. USB support in Java would allow the high level interface to be built in Java.

dubi
Offline
Joined: 2007-08-06
Points: 0

I support you cos I'm facing a similar problem: trying to communicate with a USB handheld barcode scanner

gbarton
Offline
Joined: 2003-07-08
Points: 0

It's closed source, but check out SerialPort: http://www.serialio.com/products/serialport/serialport.htm It's worked well for me a few years ago.

anees042
Offline
Joined: 2005-02-25
Points: 0

hi
nice idea. yep it will be much good if we have api's for such type of devices. ;)
Go East, Go West, Java is the best.............. ;)

i have one more question. who reads or reviews these suggestions from sun. and how will we know the status of our suggestion?
Thanx alot