On Mittwoch, 16. April 2003 15:30, Linux Aremania wrote:
I wanna make java application which call linux command, but I don't know how to call linux command. For example : I wanna display the output of "ps -ax" command in applet.
I don't program Java, but from what I know you have only very limited access to the client system in Java applets - that would be a considerable security hole. Imagine everybody who can set up a web server could run commands remotely on your machine over the Internet! (That would be the consequence of what you wish to do).
Bottom line: I doubt you can do that at all in a Java applet.
Any true expert's opinion?
Signed applets may be one way to go, but I have never used them. I'm not sure how they impact the sandbox settings. Alternatively, if you have access to the client computers, you can directly open up the applets sandbox as much as you want. I support a 500 machine (win98) intranet applet based project. We edit the java.policy file on all of the client machines to enable what we need. In that file you can grant all sorts of different access rights to servlets, on a codebase by codebase basis. For instance the default java.policy file has: grant codeBase "file:${java.home}/lib/ext/*" { permission java.security.AllPermission; }; Which means any servlet launched from the above directory tree has full permissions. Greg -- Greg Freemyer