是否有可能得到使用小程序正在运行的进程列表? [英] Is it possible to get a list of running processes using an applet?

查看:134
本文介绍了是否有可能得到使用小程序正在运行的进程列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得使用Java小程序在浏览器中运行正在运行的进程的列表。我的理解是,只要小程序签名,就能获得这些信息。这是准确的?这可能与一个未签名的Applet?最后,是否有任何FOS小程序可用,我可以看看?

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?

感谢。

推荐答案

这是小应用程序的需求的要签名时,它要访问/执行本地系统资源。这包括执行 运行#的exec() 或的 的ProcessBuilder 这是需要能够得到正在运行的进程的列表。

An applet needs to be signed whenever it want to access/execute local system resources. This includes executing Runtime#exec() or ProcessBuilder which is required to be able to get a list of running processes.

您可以找到这里一个基本的例子如何获取Windows中的列表。我建议检查如果(System.getProperty(os.name)。startsWith(赢))与再继续。

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.

移植给定的例子成小程序并不难,只是让类扩展的 JApplet的 ,并从内执行整个code <一个href=\"http://java.sun.com/javase/6/docs/api/java/security/AccessController.html#doPrivileged%28java.security.PrivilegedAction%29\"相对=nofollow> AccessController的#doPrivileged的()

Porting the given example into an applet isn't that hard, just let the class extend JApplet and execute the whole code from inside AccessController#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.

这篇关于是否有可能得到使用小程序正在运行的进程列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆