[英]Mount Windows drive in Eclipse from Linux
I am trying to mount a windows drive in Eclipse from Linux. 我正在尝试从Linux在Eclipse中安装Windows驱动器。 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. 首先,您需要root才能进行安装操作。 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.
其次,Java在虚拟机上运行,我不确定Java API在权限方面能提供多少功能。 Thirdly, is your syntax for mounting correct.
第三,您的安装语法是否正确。
Only the root can run the mount command. 只有root用户才能运行mount命令。 So, even if you succeed in constructing the mount command, it won't work unless you run the resulting Java application as the root.
因此,即使您成功构建了mount命令,它也不会起作用,除非您将生成的Java应用程序作为根运行。
Eclipse is really entirely beside the point. Eclipse确实完全没有意义。 It is a Java program you are writing, and you just happen to be using Eclipse to edit it.
这是您正在编写的Java程序,您碰巧正在使用Eclipse对其进行编辑。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.