I've found another great online Java compiler called Ideone.com. This tool compiles the code and offers an input box to enter the input for a program. And it will return the output. All these happens online with a simple click :)
Here is the screenshot for Ideone.com homepage
Ideone.com homepage
  1. Choose your preferred programming language
  2. Choose a template and modify template code / type in your program
  3. Provide input for your program. Leave blank if your program doesn't need input
  4. Click on Ideone it! button, your program will be ready
Ideone.com currently supports various different platforms that include (please note that it supports most popular languages C, C++, C#, Java, VB.NET, SQL)
  • Ada
  • Assembler
  • AWK (gawk)
  • AWK (mawk)
  • Bash
  • bc
  • Brainf**k
  • C
  • C#
  • C++
  • C++0x
  • C99 strict
  • CLIPS
  • Clojure
  • COBOL
  • COBOL 85
  • Common Lisp (clisp)
  • D (dmd)
  • Erlang
  • F#
  • Factor
  • Falcon
  • Forth
  • Fortran
  • Go
  • Groovy
  • Haskell
  • Icon
  • Intercal
  • Java
  • Java7
  • JavaScript (rhino)
  • JavaScript (spidermonkey)
  • Lua
  • Nemerle
  • Nice
  • Nimrod
  • Objective-C
  • Ocaml
  • Oz
  • Pascal (fpc)
  • Pascal (gpc)
  • Perl
  • Perl 6
  • PHP
  • Pike
  • Prolog (gnu)
  • Prolog (swi)
  • Python
  • Python 3
  • R
  • Ruby
  • Scala
  • Scheme (guile)
  • Smalltalk
  • SQL
  • Tcl
  • Text
  • Unlambda
  • VB.NET
  • Whitespace

This tool also has another great feature i.e.; it will create a shorten URL for your program so that you can share it with your friends. For example, I've written a sample program. My program's shorten URL is - http://ideone.com/P7BoW