In a previous SO question, it was mentioned that USB devices can be mounted using the following approach in Windows:
MOUNTVOL C:\USB: \\?\Volume{ebc79032-5270-11d8-a724-806d6172696f}\
My question is what is that String starting with \\?\Volume called, and what is the best way to retrieve that. I would rather not use .NET if possible since you can’t really ‘bundle’ the .NET runtime without physically installing it on the machine as far as I know.
I would also be interested in using JNA if that is possible.
You can’t bundle the Java ‘…runtime without physically installing it on the machine…’ either.
Enumerating the device after it is mounting should be straightforward. Actually mounting the device should NOT be straightforward since Java (and .NET) are both designed to abstract away the hardware.
I recommend that you pick a more appropriate tool for this. Either choose to simply invoke another process to run the mount command (knowing that it won’t be portable), or choose a tool that does not abstract away the hardware, or at least less so (perhaps Python?).
EDIT: Clarification on JVM install…
Excellent point–a JVM installation can be much less invasive than a .NET installation since the latter MUST integrate with the OS while the former merely CAN integrate with the OS. So, yes, including a private JVM install is viable and perhaps desirable.
NOTE: The question includes the mount command for the USB device, which tends to emphasize that aspect as a primary requirement.