开发者

Java codes for USB

I want to create a program using Java for Automatically copied USB's data 开发者_如何学JAVAwhen it's insert to machine. How I do it?


There is no such thing as "USBs data", the very concept doesn't exist.


There is nothing specific in Java SE for do this job.

I may think of two ways to get that working:

  1. Write a Java program that starts on boot (maybe a service), the prog scans continously available "drives" (D:,E:,F: ... in Windows, mount on Linux), the USB flash may be marked with a specific folder/file name (eg. COPY_USB_). That can be done with the File class.

  2. Write a Java program that get invoked on plug-in. I know that can be done on Linux with hotplug-script support.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜