I am new to linux I have a Kali 2.0. I was trying to install jdk 8 on it. I couldn't do it via terminal. I downloaded the jdk package from Java website and extracted it using tar -xf to my home directory Added the directory containing javac to my path variable permanently. And I removed the existing Java 1.7 It said something like /usr/bin/javac missing. I guess I was feeling really stupid but I copied all the files from the jdk folder I downloaded onto /usr/bin/ and tried the javac command. This time it said some lib file wasn't found so I opened each folder from the jdk folder I downloaded and copied all the files and not the folders from each folder onto the /usr/bin/ directory. I have no idea what I did but now when I try to install the old jdk I had (using apt-get install openjdk-7-jdk) it gets installed but then when I try javac , I get the same message some lib file is missing. Could someone please tell me what I did to my system and how can I fix it?
I still have no idea on what effect adding extra files and replacing files at /usr/bin will do. I guess I'll have to wait and see whether applications will start to crash or not and repair them.
But here is the good news, I finally got the jdk8 installed. Since no other way was work for me.. I made a link to the javac file in the original file that I externally downloaded onto my home directory and placed this link in /usr/bin/ directory and renamed the link as javac and deleted the javac I copied onto the directory earlier. And guess what.. it worked.