Jessie Raspbian took a different but similar path as other answers here.
# First the jre needs X (boo!) so switch that out to a headless version sudo apt-get install -y openjdk-7-jre-headless # Next x11 won't go because libice6 is installed # but this seems to trigger the same result sudo apt-get remove -y libice6 # Finally clean up sudo apt-get autoremove -y --purge
While I'm at it, cleaning up for headless mode:
# you can also create this blank file after you # burn your image to the SD card touch /boot/ssh sudo raspi-config 3. Boot Options - B1 Desktop / CLI - B1 Text console, requiring user to login - Press Enter - Tab over to Finish - Yes to Reboot # switch users, get rid of default password in a way sudo useradd -G sudo -m your_new_username sudo passwd your_new_username sudo userdel -r pi
Headless server!