• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

get the device letter of usb as soon as it connected to the computer

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

i am developing one software,in which i have to detect the usb arrrival and it has to get the drive letter of that device(like F,G,M).can you please help me to get code which gets the device letter of connected device .and it has to detect every time as soon as usb connects to the port and it has to get the device letter ,that means it has to work for more than one usb devices.
 
Sheriff
Posts: 22849
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if we can do this in Java without some JNI. You could try a third party library like jUSB and see if that supports what you want. If not, you will have to use JNI yourself.
 
manucng davangere
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Prime wrote:I'm not sure if we can do this in Java without some JNI. You could try a third party library like jUSB and see if that supports what you want. If not, you will have to use JNI yourself.




i am not able to create dll also .i am not getting c/c++ code to detect device and get drive letter .do you have any source?.
 
Rob Spoor
Sheriff
Posts: 22849
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I haven't done any USB programming at all.
 
reply
    Bookmark Topic Watch Topic
  • New Topic