VMWare - RunScriptInGuest、RunProgramInGuest Java - jar 执行问题
我正在尝试在虚拟机内执行 jar。我对 VMWare 很陌生,在尝试在某些虚拟机中运行 jar 时遇到了困难。
我尝试过以下两种方法,但都没有成功。
vmObject.RunProgramInGuest(@"C:\Simulation.jar", "", true, false, false);
vmObject.RunScriptInGuest(@"C:\Simulation.jar","java", true, false);
如果有任何建议,我将不胜感激。
I'm trying to execute a jar inside a virtual machine. I'm very new to VMWare and I've hit a brick wall trying to run a jar inside some vms.
I've tried both of the following with no luck.
vmObject.RunProgramInGuest(@"C:\Simulation.jar", "", true, false, false);
vmObject.RunScriptInGuest(@"C:\Simulation.jar","java", true, false);
I'd be grateful for any advise.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定您正在使用的 API 的具体接口是什么,但看起来您已经向后获取了前两个参数。以下是供参考的函数调用(来自 这里):
对于运行 JAR 文件,命令行可执行文件是
java
,后面是要执行的 JAR。例如:反转前两个参数应该会给出与该命令等效的 API:
I'm not sure exactly what interface to the API you're using, but it looks like you've got the first two arguments backwards. Here is the function call for reference (from here):
For running JAR files, the command line executable is
java
, followed by the JAR to execute. For example:Reversing your first two arguments should give you the API equivalent of that command: