Jeremy Stein - Brain
« How to set an Active Directory password through Directory Integrator | Directory Integrator: javax.naming.CommunicationException: Request: 1 cancelled » |
How to call a system command from Javascript
This will not work from a browser. This works with LiveConnect to do server-side scripting for applications that support it (like IBM Tivoli Directory Integrator).
var runtime = java.lang.Runtime.getRuntime();
var process = runtime.exec(command);
process.waitFor();
var exitValue = process.exitValue();
if (exitValue == 0)
…
Ideally, you should pass the command as an array. Also, you should handle the streams.
No Comments
Be the first to comment!
« How to set an Active Directory password through Directory Integrator | Directory Integrator: javax.naming.CommunicationException: Request: 1 cancelled » |
Leave a Reply