How to Install Java on Debian
- 1). Open a Terminal from your Desktop.
- 2). Type "sudo apt-get install default-jre" (without the quotes) and hit "Enter."
- 3). Type your root password and hit "Enter." The installer will run you through a few questions you will have to answer. For most, "yes" is the proper answer, but read through them anyways.
- 4). Test to make sure Java is installed by typing "java --version" into the terminal.
Source...