开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜