My pi runs a raspbian distro (2013-09-25-wheezy-raspbian.zip)
What the raspberry page officially recommends is the jdk. (Source: http://www.raspberrypi.org/archives/4920).
sudo apt-get update && sudo apt-get install oracle-java7-jdk
However, this doesn't include a server on the pi. The jre needs to be installed instead.