如何创建Java沙箱? [英] How do I create a Java sandbox?

查看:293
本文介绍了如何创建Java沙箱?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让我的应用程序运行其他人的代码,也就是插件.但是,我必须使用哪些选项来确保此安全性,以便它们不会编写恶意代码.我该如何控制他们可以做什么或不能做什么?

I want to make my application to run other people's code, aka plugins. However, what options do I have to make this secure so they don't write malicious code. How do I control what they can or can not do?

我偶然发现JVM具有内置沙箱"功能-这是什么,这是唯一的方法吗?是否有用于制作沙箱的第三方Java库?

I have stumbled around that JVM has a "built in sandbox" feature - what is it and is this the only way? Are there third-party Java libraries for making a sandbox?

我有什么选择?赞赏链接到指南和示例!

What options do I have? Links to guides and examples is appreciated!

推荐答案

您正在寻找 policy .

You are looking for a security manager. You can restrict the permissions of an application by specifying a policy.

这篇关于如何创建Java沙箱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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