I’d like to get the list of running processes using a java applet running in a browser. My understanding is that, as long as the applet is signed, it will be able to get this information. Is this accurate? Is this possible with an unsigned applet? Finally, are there any FOS applets available that I could take a look at?
Thanks.
An applet needs to be signed whenever it want to access/execute local system resources. This includes executing
Runtime#exec()orProcessBuilderwhich is required to be able to get a list of running processes.You can find here a basic example how to get that list in Windows. I’d suggest to check
if (System.getProperty("os.name").startsWith("win"))before continuing with that.Porting the given example into an applet isn’t that hard, just let the class extend
JAppletand execute the whole code from insideAccessController#doPrivileged().As to signing the applet, you can either sign it manually, the enduser would only face a security warning with a confirmation whether to execute it or not, or you can let it sign by a 3rd party company for some $$$, e.g. VeriSign, this way the enduser won’t face the security warning. Not signing it will cause the applet not be able to run at all.