Java isn't really appropriate for something like this. You could, I suppose, paste the entire main class into the text box and run it that way.
If Java-like syntax is desired (although I can't imagine why it would be), BeanShell would be the way to go.