I am creating an online judge, for this I want that the submitted java code should not utilize the parallel processing of CPU. So, I want that the multi threading of the Java application to be disabled.
The application sent to the server would be just a single java file, it would be compiled to byte code and then executed, suppose the application is using threads, it is creating a thread, the application should be closed by throwing some exception like Permission Denied like error.