简体   繁体   English

从Linux在Eclipse中挂载Windows驱动器

[英]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.

相关问题 如何在Java中安装Windows驱动器? - How can I mount a windows drive in Java? 使用Eclipse在Windows上运行.sh(来自Linux)脚本 - Run .sh (from linux) scripts on windows using eclipse 将Eclipse中的Java项目从Windows导出和导入到Linux - Exporting and importing java project in Eclipse from Windows to Linux Eclipse-从Linux导入Windows的项目未加载资源 - Eclipse - project imported to Windows from Linux not loading resources 如何从Eclipse Windows到Linux服务器执行Java程序 - How to execute java program from eclipse windows to Linux server Windows 7和Eclipse,如何运行遇到samba挂载的主应用程序 - Windows 7 and Eclipse, how to run Main applications that hit a samba mount 如何将Windows上用Eclipse编写的JSP转换为Linux? - How to convert JSP written in Eclipse on Windows to Linux? 在Linux中编译的Eclipse插件可以在Windows上运行吗? - Eclipse plugin compiled in linux work on windows? 如何将Eclipse中的libgdx项目从Windows移植到Linux,反之亦然? - How can I transfter a libgdx project in eclipse from windows to linux and vice versa? 是否可以从外部 flash 驱动器运行 java (jdk-windows)、Eclipse (indigo) 和 Android-sdk FOR android 应用程序开发 - Is it possible to run java (jdk-windows) , Eclipse (indigo) and Android-sdk FOR android app development from external flash drive
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM