Is there a simple way to find the startup volume name? I can think
of a
couple of ways using Runtime.exec(): do "ls -l /Volumes" and see
what links
to /,
Or get a File.listFiles() of /Volumes in Java and call
getCanonicalPath()
on each File (optional: in a filter object). The one that resolves
to "/"
is the startup volume, and you can then use the uncanonical path
(i.e. the
pathname of the symlink) as desired.
This won't work before 10.4, which I think is when the "symlink to
startup
volume" first appeared. Or maybe it was 10.3. Anyway, if nothing
canonicalizes to "/", I think you're stuck, if the pathname problem
is that
serious.
You can exec the command:
osascript -e 'tell app "Finder" to return the name of the startup disk'
and then parse the output from the Process object.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden