java api to mount device
1 posts in topic
Flat View  Flat View

Posted By:   Beth_Hechanova
Posted On:   Thursday, October 18, 2007 06:52 PM


Does anyone know of a java api available that can be used to mount/unmount devices?

I don't know if this matters or not, but I'm using sun runtime 1.6.0_02-b05, running on Fedora 7.

I know I can execute a process from java that just runs the mount command, but just thought there might be an api available that takes care of this already.


Re: java api to mount device

Posted By:   Robert_Lybarger  
Posted On:   Thursday, October 18, 2007 07:43 PM

No there isn't. The concept of "mounting" a device into the filesystem is unique to UNIX-like operating systems, and is really something that the operating system itself is responsible for managing. (Thus, it isn't really in Java's domain to want to be able to mount devices.) You'll need to exec the mount or umount commands directly, and carefully arrange the various priviledges (possibly via sudo settings if you need to run the app as non-root).
About | Sitemap | Contact