How to format an USB drive from Java code?
I tried with the code "Process p =Runtime.getRuntime().exec(sFormatCmd);" but landing up with the following error:
java.io.IOException: Cannot run program "format": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at java.lang.Runtime.exec(Runtime.java:615)
at java.lang.Runtime.exec(Runtime.java:448)
at java.lang.Runtime.exec(Runtime.java:345)
Can somebody help me regarding the same?