Mount Windows drive in Eclipse from Linux
I am trying to mount a windows drive in Eclipse from Linux. Is that even possible?This is my approach
String cmd = "MOUNTVOL " + volumeToMount + " " + mountPoint;
Process 开发者_开发百科proc = Runtime.getRuntime().exec(cmdStr);
If I am going wrong anywhere,please let me know if there is any other way of achieving this.
Firstly, u need root to do mount operation. Secondly, Java runs on a virtual machine and I am not sure as how much power do the Java APIs give you in terms of permissions. Thirdly, is your syntax for mounting correct.
Only the root can run the mount command. So, even if you succeed in constructing the mount command, it won't work unless you run the resulting Java application as the root.
Eclipse is really entirely beside the point. It is a Java program you are writing, and you just happen to be using Eclipse to edit it.
精彩评论