I just ran this:

java -version

But it gave this error:

The program 'java' can be found in the following packages:
 * default-jre
 * gcj-4.9-jre-headless
 * openjdk-7-jre-headless
 * gcj-4.8-jre-headless
 * openjdk-6-jre-headless
 * openjdk-8-jre-headless
Try: apt-get install <selected package>
  • 2
    It. Is. Telling. You. To. Install. Java. Have you installed Java? Can you see it says to try apt-get install <selected package>? Did you try? – Tim May 21 '15 at 18:28
  • Why do people not even bother to read errors? – UniversallyUniqueID May 10 '16 at 17:30
  • I don't believe that the question is irrelevant. I just tried to completely remove java from my linux. The message on console is ambiguous "(...) java can be found (...)". It doesn't say that java was uninstalled and that those programs require it. I just upvoted the question. – Almir Campos Aug 6 '17 at 9:35

Seems like you don't have Java installed on your system.

Run the following command in the terminal to install Java.

sudo apt-get install openjdk-7-jre

Or the latest version

sudo apt-get install openjdk-8-jre

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.