可信任的1.5小程序可以执行系统命令吗?

如果是这样,这种能力是否有限制? 具体来说,我需要针对Mac OSX。

我之前使用过这个在Windows系统上启动的东西,但从来没有在Mac上试过它。

public void launchScript(String args) { String cmd = null; try { cmd = getParameter(PARAM_CMD); System.out.println("args value : = " + args); System.out.println("cmd value : = " + cmd); System.out.println("Full command: = " + cmd + " " + args); if (cmd != null && !cmd.trim().equals("")) { if (args == null || args.trim().equals("")) { final String tempcmd = cmd; AccessController.doPrivileged(new PrivilegedAction() { public Object run() { try { Runtime.getRuntime().exec(tempcmd); } catch (Exception e) { System.out.println("Caught exception in privileged block, Exception:" + e.toString()); } return null; // nothing to return } }); System.out.println(cmd); } else { final String tempargs = args; final String tempcmd1 = cmd; AccessController.doPrivileged(new PrivilegedAction() { public Object run() { try { Runtime.getRuntime().exec(tempcmd1 + " " + tempargs); } catch (Exception e) { System.out.println("Caught exception in privileged block, Exception:" + e.toString()); } return null; // nothing to return } }); System.out.println(cmd + " " + args); } } else { System.out.println("execCmd parameter is null or empty"); } } catch (Exception e) { System.out.println("Error executing command --> " + cmd + " (" + args + ")"); System.out.println(e); } } 

事实certificate,他们可以。

我所知道的唯一相关问题是在Windows Vista上使用Internet Explorer中的旧“经典”插件,applet以“低完整性”过程运行,这使得它特别有用。

和往常一样,我通常的建议是在签署任何代码之前知道你在做什么。