由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 如何在Java上跑Windows PowerShell cmdlet?
相关主题
where to execute java program?跪求大牛指点Java,看不懂什么意思。
JavaOneapache axis2?
java编译的文件能不能作成可执行文件?java development enviornment - software and hardware -Please
How to filter out *.java from jar file?请教目前比较流行的Java Web Service框架
Java on AIX求指教: CXF Cleint API for Axis2 SOAP web service问题
about java -D option?how to pass a client certificate (x509) while calling a web service?
问一个java和netbeans的问题Re: 有用netbeans的吗?
mac不需要下载安装JDK,那还需要建立新的executable path么?Any powershell equivalent stuff?
相关话题的讨论汇总
话题: powershell话题: windows话题: java话题: web话题: service
进入Java版参与讨论
1 (共1页)
S*******h
发帖数: 7021
1
We want to host a Web Service in an internet facing web server and push software updates to Windows and Linux machines from this Web Service. In the Windows environment,the Windows machine management tasks are typically done by Windows PowerShell with Windows Management Instrumentation(WMI) query.
In our initial analysis, we prefer to use Java and Apache Axis2 to implement this Web Service. The question comes to how to make Java execute PowerShell commands in the web service? If Java can’t do this, are there other alternatives that can make this web service perform OS configuration and machine management tasks for both Windows and Linux machines?
先谢过
g*****g
发帖数: 34805
2
I don't know much about PowerShell. But as long as you can run the
thing as a script, it should be fine. A script can be ran by calling
Runtime.exec

software updates to Windows and Linux machines from this Web Service. In
the Windows environment,the Windows machine management tasks are typically
done by Windows PowerShell wi
implement this Web Service. The question comes to how to make Java execute
PowerShell commands in the web service? If Java can’t do this, are there
other alternatives that can make

【在 S*******h 的大作中提到】
: We want to host a Web Service in an internet facing web server and push software updates to Windows and Linux machines from this Web Service. In the Windows environment,the Windows machine management tasks are typically done by Windows PowerShell with Windows Management Instrumentation(WMI) query.
: In our initial analysis, we prefer to use Java and Apache Axis2 to implement this Web Service. The question comes to how to make Java execute PowerShell commands in the web service? If Java can’t do this, are there other alternatives that can make this web service perform OS configuration and machine management tasks for both Windows and Linux machines?
: 先谢过

S*******h
发帖数: 7021
3
Yes, PowerShell can be run as a script.
To run PowerShell script, you need to install PowerShell 2.0 and, ideally,
use Putty Plink to SSH from Powershell.
I looked up the internet. It seems that PowerShell has a version for Apache
Linux server called PASH: http://blogs.msdn.com/b/powershell/archive/2008/04/08/powershell-on-linux-solaris-mac-etc.aspx
Does anyone ever execute PowerShell (PASH) from Java in Linux server? Does
it work fine?

execute

【在 g*****g 的大作中提到】
: I don't know much about PowerShell. But as long as you can run the
: thing as a script, it should be fine. A script can be ran by calling
: Runtime.exec
:
: software updates to Windows and Linux machines from this Web Service. In
: the Windows environment,the Windows machine management tasks are typically
: done by Windows PowerShell wi
: implement this Web Service. The question comes to how to make Java execute
: PowerShell commands in the web service? If Java can’t do this, are there
: other alternatives that can make

t*****s
发帖数: 124
4
execute PowerShell on Linux server?
PowerShell need .Net Framework support, so you need have a .Net Framework
environment on Linux server first, then implement PowerShell runtime on
Linux

Apache

【在 S*******h 的大作中提到】
: Yes, PowerShell can be run as a script.
: To run PowerShell script, you need to install PowerShell 2.0 and, ideally,
: use Putty Plink to SSH from Powershell.
: I looked up the internet. It seems that PowerShell has a version for Apache
: Linux server called PASH: http://blogs.msdn.com/b/powershell/archive/2008/04/08/powershell-on-linux-solaris-mac-etc.aspx
: Does anyone ever execute PowerShell (PASH) from Java in Linux server? Does
: it work fine?
:
: execute

S*******h
发帖数: 7021
5
多谢指点
I searched internet and found a .NET Framework for non-MS platform called "Mono".
http://www.mono-project.com/Main_Page
Is this the .NET framework you talked about? So once I install Mono, I am able to run PowerShell script at Java Web Service via Java RunTime.exec?

【在 t*****s 的大作中提到】
: execute PowerShell on Linux server?
: PowerShell need .Net Framework support, so you need have a .Net Framework
: environment on Linux server first, then implement PowerShell runtime on
: Linux
:
: Apache

t*****s
发帖数: 124
6
see my reply to your message

"Mono".
able to run PowerShell script at Java Web Service via Java RunTime.exec?

【在 S*******h 的大作中提到】
: 多谢指点
: I searched internet and found a .NET Framework for non-MS platform called "Mono".
: http://www.mono-project.com/Main_Page
: Is this the .NET framework you talked about? So once I install Mono, I am able to run PowerShell script at Java Web Service via Java RunTime.exec?

g*****g
发帖数: 34805
7
Don't count on Mono to run anything serious. Just write a shell
script on linux and be done with it.

"Mono".
able to run PowerShell script at Java Web Service via Java RunTime.exec?

【在 S*******h 的大作中提到】
: 多谢指点
: I searched internet and found a .NET Framework for non-MS platform called "Mono".
: http://www.mono-project.com/Main_Page
: Is this the .NET framework you talked about? So once I install Mono, I am able to run PowerShell script at Java Web Service via Java RunTime.exec?

1 (共1页)
进入Java版参与讨论
相关主题
Any powershell equivalent stuff?Java on AIX
Code Instrumenterabout java -D option?
hibernate lazy-loading/ compile time instrumentation?问一个java和netbeans的问题
BBS CLIENT 不需要中文系统 v0.0.0.0.00001mac不需要下载安装JDK,那还需要建立新的executable path么?
where to execute java program?跪求大牛指点Java,看不懂什么意思。
JavaOneapache axis2?
java编译的文件能不能作成可执行文件?java development enviornment - software and hardware -Please
How to filter out *.java from jar file?请教目前比较流行的Java Web Service框架
相关话题的讨论汇总
话题: powershell话题: windows话题: java话题: web话题: service