从Linux挂载Eclipse中的Windows驱动器

时间:2022-02-01 20:34:47

I am trying to mount a windows drive in Eclipse from Linux. Is that even possible?This is my approach

我试图从Linux安装Eclipse驱动器中的Windows驱动器。这甚至可能吗?这是我的方法

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.

如果我在任何地方出错了,请告诉我是否有其他方法可以实现这一目标。

2 个解决方案

#1


0  

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.

首先,你需要root来做挂载操作。其次,Java在虚拟机上运行,​​我不确定Java API在权限方面给你多少权力。第三,是您正确安装的语法。

#2


0  

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.

只有root才能运行mount命令。因此,即使您成功构建了mount命令,除非您将生成的Java应用程序作为根运行,否则它将无法工作。

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.

Eclipse完全不是重点。它是您正在编写的Java程序,您恰好正在使用Eclipse编辑它。

#1


0  

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.

首先,你需要root来做挂载操作。其次,Java在虚拟机上运行,​​我不确定Java API在权限方面给你多少权力。第三,是您正确安装的语法。

#2


0  

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.

只有root才能运行mount命令。因此,即使您成功构建了mount命令,除非您将生成的Java应用程序作为根运行,否则它将无法工作。

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.

Eclipse完全不是重点。它是您正在编写的Java程序,您恰好正在使用Eclipse编辑它。