I am creating an application that allows people to load in their Java applications. Is there a way to disable parts of the Java Standard Library like JFrames and Files? Preferably when a user tries to access these parts it should throw an exception.
Preferably I would like to block the user to use any classes that do not do any I/O (like files and sockets) or do anything like rendering (JFrames).
The idea is the user can write Java plugins for an application, and thus doesn't need any of these options and should be prohibited from using them.