I'm creating a webpage on my Linux server for my students to compile Java code online: they write their code in a textarea/html and then press a button to compile/execute their programs

The first thinks I want to do, it's prohibit the usage of "java.io.file" ...
Do you have any tips to block this access?
I use jdk.8.0\_60

I don't know if anyone have some information to up the security of code's execution on my server ...