This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
You can compile code using that link. I am not aware of any site that allows you to run the code. For all they know you might upload a class that tries to delete all the files or take up a lot of memory and wait forever. So for security reasons, web sites might not allow you to run classes on their servers. If you provide a .java file, you get a .class file. Running it is in your hands.