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