Mount and unmount hard drives
How can I mount and unmount hard drives (platform independent, so no using Runtime to execute a hard-coded command) in the Java Programming Language? The answer is "Yes And No". You could not mount or unmount devices in java because each OS has their own methods to do this. BUT... you can provide java api that use adapter pattern for native interface. You should do some things: create Java interfaces that support mount/unmount commands create classes that implements interfaces as native methods create native implementations of this commands in C or other language. One implemantation for OS