Ubantu Configuring Java Environment variables

Source: Internet
Author: User

Setting environment variables Java jdk1.8
1. Download the JDK select Linux Tazip
2. Unzip and copy the file to/URS/LIB/JVM
Due to the use of the MV JDK1.8.0_101/USER/LIB/JVM command
Causes the file to move directly into the JVM and the original folder becomes the JVM to keep the original file from disappearing use-a
3. Configure Environment variables
Input sudo gedit ~/.BASHRC
Add at the end
Export JAVA_HOME=/USR/LIB/JVM

Export JRE_HOME=${JAVA_HOME}/JRE

Export Classpath=.:${java_home}/lib:${jre_home}/lib

Export Path=${java_home}/bin: $PATH
4. Since Bantukylin 16.4 does not have a JDK, you do not need to set the default JDK and the environment variable you want to configure takes effect immediately
Using the source ~/.BASHRC command
5. Testing
Input Java-version
Show Installed jdk1.8
6. Unresolved issues
The terminal issues a warning after saving BASHRC set document metadata failed does not support setting properties Medatata:: Gedit pisition, not sure if the following eclipse could not find the path associated with this.
Installation of Eclipse:
1. Click the software to install the download when prompted to find the JDK at this time to establish a soft link to solve the problem immediately, the specific command is as follows:
Enter the MkDir JRE in the Software installation directory
Enter Ln-s/usr/lib/jvm/bin bin under JRE
Solution to the problem
Note: Remove soft link command: RM-RF jire
Ubuntu needs to be familiar with apt commands, and the use of configure/autoconfig should be extremely easy.

Ubantu Configuring Java Environment variables

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.