Home > OS >  Kali_2019. 4 installed JAVA environment
Kali_2019. 4 installed JAVA environment

Time:09-23


Kali_2019. 4 installed JAVA environment

The following description:
JDK - 13.0.1 _linux - x64_bin. Tar. Gz # this is the Java download file name

JDK - 13.0.1 # is this download JDK - 13.0.1 _linux - x64_bin. Tar. The name of gz decompression after

Sudo tar XZVF JDK - 13.0.1 _linux - x64_bin. Tar. Gz # extract the command


1. Set up the Java directory
Execute the command: sudo mkdir -p/root/Java or mkdir/root/Java



2. To download the JDK 8 u91 - Linux - x64. Tar. Gz file into the Java folder, and decompression operation extract (using the command), decompress after the JDK - 13.0.1 folder file



3, configure the environment variablesSudo vim/etc/profile

# # # to copy the following code to the end profile file
JAVA_HOME=/root/Java/JDK - 13.0.1 # file path
PATH=$PATH: $HOME/bin: $JAVA_HOME/bin
Export JAVA_HOME
The export PATH

4. Install and register
# will/root/Java/JDK - 13.0.1 Java/bin/Java folder, javac files installed to/usr/bin folder, and generate Java and javac default JDK files
Update - alternatives -- install/usr/bin/Java Java/root/Java/JDK - 13.0.1/bin/Java 1

Update - alternatives -- install/usr/bin/javac javac/root/Java/JDK - 13.0.1/bin/javac 1

Update - alternatives - set Java/root/Java/JDK - 13.0.1/bin/Java

Update - alternatives - set javac/root/Java/JDK - 13.0.1/bin/javac



5. Reload the profile

The source/etc/profile

Through the Java version and javac - version can see whether the installation is complete

As shown in the success of the installation:
C: \ root> The source/etc/profile

Root @ kali: ~ # Java - version
Picked up _JAVA_OPTIONS: - Dawt. UseSystemAAFontSettings=on - Dswing. Aatext=true
Java version "13.0.1 2019-10-15
"Java (TM) SE Runtime Environment (build 13.0.1 + 9)
The Java HotSpot (TM) 64 - Bit Server VM (build 13.0.1 + 9, mixed mode, sharing)

Root @ kali: ~ # javac - version
Picked up _JAVA_OPTIONS: - Dawt. UseSystemAAFontSettings=on - Dswing. Aatext=true
Javac 13.0.1
  • Related