简体   繁体   English

通过Java Applet运行服务器端Powershell脚本吗?

[英]Running server-side Powershell scripts via Java Applet?

I'm looking to see if there's a formal/proper way to run a Powershell script on server-side from a client Java Applet? 我正在查看是否存在从客户端Java Applet在服务器端运行Powershell脚本的正式/正确方法?

Powershell offers some great stuff, and up until now I've been using just a PHP form to execute the scripts but it causes funny behaviour with the Applet (for example running the destroy() portion of the Applet). Powershell提供了一些很棒的东西,到目前为止,我一直仅使用PHP表单执行脚本,但是它会导致Applet发生有趣的行为(例如,运行Applet的destroy()部分)。

Also, a return from the Powershell would be great to display in the Applet. 而且,从Powershell返回的收益非常适合显示在Applet中。 Cheers. 干杯。

Perhaps, use System.Management.Automation and JNI4Net for bindings? 也许使用System.Management.AutomationJNI4Net进行绑定? Because interacting with powershell.exe via console redirection is error-prone. 因为通过控制台重定向与powershell.exe交互很容易出错。

More info: A JSR223 implementation for Powershell, using JNI4Net for bindings . 更多信息: Powershell的JSR223实现,使用JNI4Net进行绑定

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

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