Enumerating USB Devices on Windows with Java-Collection of common programming errors

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.