Install JDK in CentOS virtual machine environment
- Upload JDK to the Linux Virtual Machine directory (for example,/usr/lib/jvm ). The blogger uses SecureFx, which is of course a cracked version. If you need it, leave a message.
- Use SecureCRT to log on to the virtual machine and enter the directory/usr/lib/jvm command: cd/usr/lib/jvm
- Decompress JDK. JDK address: the main choice of jdk-7u79-linux-x64.tar.gz using the command tar zxvf./jdk-7u79-linux-x64.tar.gz-C/usr/lib/jvm
- Enter/etc/profile. d and create a new file: touch java. sh.
- Vi java. sh enters the vi editing mode. Press "I", enter the information in the input graph, Press Esc to exit the editing mode, enter ": wq", save and exit.
- Run source java. sh to make java. sh effective immediately.
- Run java-version. If the following content is output, the installation and environment variables are successfully configured.