Is there a way that, using java, I can mess with my systems harware? Say like pop open the disk tray, eject a flash drive or even capture the data being read from a CD or being stored to a harddrive? If so how far does this privilege go and do I need an API for it? Assuming that all system privileges allow for it.
Share
Not within Java itself, because that isn’t platform independent. People have used hacks in the past, the most common being calling some external VBScript (http://www.rgagnon.com/javadetails/java-0574.html).
You could also create your own native library and use JNI to invoke the function.