简体   繁体   English

如何通过Windows Server 2008上的Java程序创建,安装,卸载VHD?

[英]How to Create, mount , unmount VHD's through java program on windows server 2008?

With reference to VHD Java library , I tried to use libguestfs .. but I am unable to get it work. 关于VHD Java库 ,我尝试使用libguestfs ..但无法使其正常工作。 At the first glance it seems that it is not working on the windows environment. 乍一看,它似乎无法在Windows环境下运行。

But for the try I am stuck at first point only, how to get jar file for com.redhat.et.libguestfs.* classes. 但是对于尝试,我仅停留在第一点,即如何获取com.redhat.et.libguestfs.*类的jar文件。 I might be wrong in my execution plan.. kindly help. 我的执行计划可能不对..请帮助。

Is there any better way to achieve my goal of creating , mounting , unmounting VHD's through java program. 有没有更好的方法来实现我通过java程序创建,安装,卸载VHD的目标。

Thanks in advance... 提前致谢...

The Java bindings, which contain the com.redhat.et.libguestfs package, are available as part of the source distribution tarball. 包含com.redhat.et.libguestfs包的Java绑定可作为源分发压缩包的一部分使用。 This can be obtained from the libguestfs download page ; 这可以从libguestfs下载页面获得 select the latest version, currently 1.18.8 . 选择最新版本,当前为1.18.8

Alternatively, a pre-compiled JAR might be available from the Maven repository. 或者,可以从Maven存储库中获得预编译的JAR。

Either way, on Windows you likely have to compile the native libguestfs library yourself. 无论哪种方式,在Windows上您都可能必须自己编译本机libguestfs库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM