Linux Redhat installed a version of the JDK check version is not installed by the solution

Source: Internet
Author: User
Installing JDK Java-version under Linux is not the version you need

Setting environment variables, which is the most important

Add under the Etc/profile file

Export java_home=/usr/java/jdk1.8.0_131

Export path= $JAVA _home/bin: $PATH

Warm hint, modify the configuration file before the Bak one, in the case you are not sure, so as not to change the wrong, affecting other functions, and can not recover.

If you do not want to re-system, you can use the command source/etc/profile to make the configuration file effective immediately. Otherwise, the system can only be restarted for the configuration parameters to take effect

Verify that the environment variable is in effect

Verify that the environment variable is in effect and installed successfully

The original server has 1.4 JDK installed and the application needs to install 1.6 jdk. After installation, after configuring the 1.6JDK environment variable in/etc/profile, use the command java-version to display the original 1.4 version.

Workaround:

Cd/usr/binln-s-f/usr/java/jdk1.6.0_01/jre/bin/javaln-s-f/usr/java/jdk1.6.0_01/bin/javac make a link ok

Linux Redhat installed a version of the JDK check version is not installed by the solution

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.