I am trying out kali Linux on my raspberry pi for the first time, and I am trying to install java, as I use it a lot on my pi. I didn’t want to give this up because of my new os. However, when I try to install java using “apt-get install oracle-java7-jdk”, I get the error:

Package openjdk-7-jdk is not available but is referred to by another package.This may mean that the package is missing, has been obsoleted, or is only available from another source E: Unable to locate package openjdk-7-jdk

I can’t find a solution anywhere, so help would be appreciated.

  • 3
    Have you Googled "install java on kali Linux"? I did and it gave some helpful looking results. I haven't tried any, but you should before you ask here, and tell us how they fail if they don't work. – Mark Smith Apr 13 '19 at 8:23

First point is Kali Linux comes preloaded with all languages like C, C++, and Java.

To check, try the following command in terminal:

java -version

If it shows the Java information then Java is already installed on your system. If it is not, then simply use this command:

sudo apt-get install openjdk-8-jdk

It will install Java on your system.

  • The OP wants to use something that needs oracle-java7-jdk. – RalfFriedl Jun 28 '19 at 5:20
  • Judging from the title, I think more likely the OP just didn't realize he could install Java 8+ instead. – jdonald Jul 29 '19 at 0:11

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.