Of course you can deny it access to JNI [1]. The Java platform has had this built in since forever. This is how applets work. Aside from sandbox exploits classes in Java can be locked down so much that they can pretty much only allocate memory and burn cycles.
[1] http://docs.oracle.com/javase/7/docs/api/java/lang/SecurityM...