Java – “safe” scripting

Does anyone know of any scripting for the Java platform that can be forcefully restricted to a provided function set (preferably absolutely no functions unless provided)? I’ve experimented with …