Advertisement
efxtv

How to install Java8 In Kali Linux/Ubuntu/ETC

Sep 7th, 2022 (edited)
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | Cybersecurity | 0 0
  1. How to install Java8 In Kali Linux/Ubuntu/ETC
  2. How to install Java8 In Windows and Linux Playlist [ https://youtube.com/playlist?list=PLI4Vi9cCSEQlSUEFU3eiahIFpYfw3nq0m ]
  3.  
  4. Java8 for Kali Linux file Download jdk-8u341-linux-x64.tar.gz https://t.me/c/1625071517/189
  5.  
  6. sudo apt-get update;sudo apt-get upgrade
  7.  
  8. sudo tar -xf jdk-8u341-linux-x64.tar.gz -C /opt
  9.  
  10. sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.8.0_341/bin/java" 1
  11.  
  12. sudo update-alternatives --config java java-version
  13.  
  14. > Choose java8
  15.  
  16.  
  17. # METHOD 2
  18. # Using Download.py & Installer.sh
  19. # run Download.py & Installer.sh one by one
  20. ----------------------------------------Java8 Download.py
  21. import subprocess
  22. # required
  23. # pip install gdown
  24. # Download the gdrive file with link
  25. subprocess.run(["gdown", "https://drive.google.com/uc?id=1jQSrxM4rBwVe2M9GFpShwH9NiER7l7Ol"])
  26. ----------------------------------------Java8 Download.py Ends
  27.  
  28. ----------------------------------------Java8 Installer.sh
  29. installjava()
  30. {
  31. if java -version 2>&1 | grep -q '1.8'; then
  32. echo "Java 8 is already installed. Exiting script."
  33. return
  34. fi
  35. echo "Downloading jdk-8u381-linux-x64.tar.gz"
  36. pip install gdown
  37. python3 downloadjava.py
  38. sudo tar -xf jdk-8u381-linux-x64.tar.gz -C /opt/
  39. sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.8.0_381/bin/java" 1
  40. sudo update-alternatives --config java
  41. echo 'Done'
  42. java -version
  43. }
  44.  
  45. installjava
  46. ----------------------------------------Java8 Installer.sh ends
  47.  
  48.  
  49. Join us on telegram
  50. t.me/efxtv
  51.  
  52.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement