Install JDK in CentOS virtual machine environment

Source: Internet
Author: User
Upload JDK to the Linux Virtual Machine Directory (for example,/usr/lib/jvm ). The blogger uses the SecureFx tool, which is of course a cracked version. if you need it, you can leave a message and use SecureCRT to log on to the virtual machine and enter the directory/usr/lib/jvm command: cd/usr/lib/jvm decompress JDK. JDK download address: Select jdk-7u79-linux-x64.tar.gz.
  1. 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.
  2. Use SecureCRT to log on to the virtual machine and enter the directory/usr/lib/jvm command: cd/usr/lib/jvm
  3. 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
  4. Enter/etc/profile. d and create a new file: touch java. sh.
  5. 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.
  6. Run source java. sh to make java. sh effective immediately.
  7. Run java-version. if the following content is output, the installation and environment variables are successfully configured.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.