通过JAVA程序安全删除pendrive [英] safely remove pendrive through JAVA program

查看:66
本文介绍了通过JAVA程序安全删除pendrive的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好先生,
我正在用Java开发项目,希望在其中使用pendrive
如果不是扫描的4种病毒,则会自动安全删除...所以
我如何通过我的手自动安全地删除pendrive
Java或C程序???以及如何检测
设备连接到大容量存储设备中的USB端口
(即pendrive ...)通过Java或C程序...正在等待4
回复....

hello sir,
i m doing project in java in which i want pendrive to be
automatically Safely Removed if it is not scan 4 virus...So
how can i Automatically safely remove pendrive through mine
java or C program??? and also how to detect whether the
device connected to the USB port in mass storage device
(i.e pendrive...)through java or C program...waiting 4
reply....

推荐答案

您无法/安全地/以编程方式删除该设备.

如果要确保设备处于安全状态,则不能选择Java,因为这对于JVM而言太低了.
You cannot /safely remove/ the device programatically.

If you intend to ensure the device is in a safe state, then Java is not the option as this would be too low level for the JVM.


使用jni.
(java本机接口).

对于jni:


http://patriot.net/~tvalesky/jninative.html

https://sites.google.com/site/stark9000/java-native-interface-helloworld



这将是完整的帮助->

http://www.codeproject.com/KB/system/RemoveDriveByLetter.aspx

http://www.codeproject.com/KB/system/usbeject.aspx

http://www.rohitab.com/discuss/topic/34669-ejecting-a-flash-drive-using-vb/

http://www.autohotkey.com/forum/topic8923.html

http://www.xtremevbtalk.com/archive/index.php/t-239209.html
use jni.
(java native interface).

for jni :


http://patriot.net/~tvalesky/jninative.html

https://sites.google.com/site/stark9000/java-native-interface-helloworld



this will be help full ->

http://www.codeproject.com/KB/system/RemoveDriveByLetter.aspx

http://www.codeproject.com/KB/system/usbeject.aspx

http://www.rohitab.com/discuss/topic/34669-ejecting-a-flash-drive-using-vb/

http://www.autohotkey.com/forum/topic8923.html

http://www.xtremevbtalk.com/archive/index.php/t-239209.html


这篇关于通过JAVA程序安全删除pendrive的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆