Does anyone knows how to unmount a drive in java in OSx
I am trying to unmount a sdcard from java. I am using java Swing class and the drive gets mounted automatically, but how do I unmount it.
Does anyone knows how to unmount a drive in java in OSx
I am trying to unmount a sdcard from java. I am using java Swing class and the drive gets mounted automatically, but how do I unmount it.
The concept of mounting/unmounting is not platform agnostic, so it doesn't exist directly within the Java APIs. You will most probably have to issue a command line call to unmount by using Runtime.exec()
There might be open source libraries available that wrap this exec call for you, but I'm not positive.
You could call umount using Runtime.exec. Of course, this solution is not portable.