Issuing hard disk commands using java
Does anyone know a way to issue commands to the hard drive in Java? Does Java even support this kind of hardware interoperability?
For example, if I have a SCSI hard drive that I would like to query, is there a pre-existing Java method, or do I need to write my own?
http://en.wikipedia.org/wiki/SCSI has some general information about SCSI commands if you are not familiar.
Java does not support direct communication with such hardware. However, you can use JNI to call a C / C ++ function from Java that can.
Three words "JNI or JNA". I highly recommend taking a look at the latter to see if it suits your situation, rather than just choosing JNI.
No, because Java runs in a "virtual" machine, not a real one. But it can be used as a bridge like the dj mentioned earlier using JNI.
According to Wikipedia JNI can also call assembly directly. JNI can be used to call complete programs written in C or C ++
you need to write hard disk interface code in C / C ++ and then call this from Java using JNI