After centos is installed, it comes with openjdk and uses commands.Java-version, The following information is displayed:
Java version "1.6.0"Openjdk Runtime Environment (build 1.6.0-b09)Openjdk 64-bit server VM (build 1.6.0-b09, mixed mode)
It is best to uninstall openjdk first and install the JDK of sun.
View
, carefully study !) You can find the javac file in the bin, indicating that this is JDK!In this case, you only need to open the environment variable file suvi/etc/profile in the terminal (Save the command and Press ESC, then enter ": w" to save the file, and then ": q" to exit vi) enter the corresponding directory:ExportJAVA_HOME =/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.ExportCLASSPATH =.: $ JAVA_HOME/jre/lib/rt. jar: $ JAVA_HOME/lib/dt. jar: $ JAVA_
the appropriate directory:
Export java_home=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.55.x86_64
Export classpath=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $PATH: $JAVA _home/bin
This allows us to set up the JDK and then enter Source/etc/profile or SOURCE/ROOT/.BASHRC to take effect.
2.
centos6.5 under t
First step: Check if the Linux-brought JDK is installed (uninstall CentOS installed 1.4)The installed CentOS will bring openjdk, with the command java-version, will have the following information:Java Version "1.6.0"OpenJDK Runtime Environment (build 1.6.0-b09)OpenJDK 64-bit Server VM (build 1.6.0-b09, Mixed mode)It is best to uninstall the
Check whether JDK is installed in Linux.The installed CentOS comes with OpenJdk and uses the java-version command. The following information is displayed:Java version "1.6.0 Prime;OpenJDK Runtime Environment (build 1.6.0-b09)OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)It is best to uninstall openjdk fir
Spent three days on Windows OPENJDK, not familiar with bash, plus a variety of inexplicable dependencies and script bugs, physically and mentally exhausted. Finally make all the time produced a inexplicable error said what has warning and-werror to true, dead or alive no Google to-werror is what ghost, had to forget.Today's rookie suddenly remembered, I also have Ubuntu virtual machine, right vote a try, did not expect easy success.Platform: Ubuntu Ve
In linux, uninstall openjdk, install sunjdk, and configure environment variables. Generally, openjdk is installed in linux. However, in development, you must use sunjdk. In this case, you can only uninstall openjdk and install sunjdk. 1. query the existing installation version rpm-qa | grep jdk 2, uninstall openjdk sud
Install the official JDK under Fedora 20 to replace OpenJDK and configure environment variables.
Fedora 20 comes with OpenJDK, So if you install the official JDK, you must first Delete OpenJDK as follows:
1: run the rpm-qa | grep jdk command to check the current jdk status.
2: yum-y remove java java-1.7.0-openjdk *
1. View your own JDK version java-version2. View Rpm-qa | grep javaThe following information is displayed:java-1.4.2-gcj-compat-1.4.2.0-40jpp.115Java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5Unloading:RPM-E--nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp.115RPM-E--nodeps Java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5There are some other commands.Rpm-qa | grep GCJRpm-qa | grep JDKIf OpenJDK
Installing JDK SE1.8 with CentOS
The Yum are usually installed through the OpenJDK
Typically used when developing on a Windows platform is SUNJDK
To avoid possible problems, uninstall your own OPENJDK installation SUNJDK
View the OPENJDK version first
Yum List installed |grep Java
Yum-y Remove java-1.6.0-openjdk.x86_64 Delete
View the JDK version installed by the system
[email protected]: ~# java-versionJava Version "1.7.0_79"OpenJDK Runtime Environment (IcedTea 2.5.5) (7U79-2.5.5-0UBUNTU1)OpenJDK 64-bit Server VM (build 24.79-b02, Mixed mode)2. Upload the JDK to the/OPT directory[email protected]: ~# cd/opt[email protected]:/opt# lsJdk-6u45-linux-x64.bin3. Modify the permissions of the JDK[email protected]:/opt# chmod +x J
=.: $ JAVA_HOME/lib: $ JAVA_HOME/jre/lib
Next
# Source/root/. bashrc switch to your user and then under source.# Echo $ JAVA_HOME/Usr/java/java7
If openjdk is not installed, enter
#/Usr/java/java7/bin/java-version
Now let's start the link. add to the bin of the system and use the update-alternatives command to maintain the soft connection of the system. update t
Because compiling Android source code requires openjdk1.7.x version. Ubuntu 16.04 comes with a 1.8.X version of OPENJDK.sudo apt-get install openjdk-7-jre or sudo apt-get install OPENJDK-7-JDKIf it appearsThere is no available package openjdk-7-jdk, but it is referenced by other packages.This may mean that the missing
Original address: Https://marcin-chwedczuk.github.io/debugging-openjdk8-with-netbeans-on-ubuntuThe overview is as follows:1 is of course download openjdk. I chose jdk8u, which is the mainstream version of the current major companies, in addition Jdk9 and JDK10 directory structure compared with the traditional directory structure has changed, from the existing data to find the relevant code will increase the difficulty. Two ways to download:1) HG clone
Author: fbysssQQ: Wine bar Bar I scatteredBlog:blog.csdn.net/fbysssDisclaimer: This article by fbysss original, reproduced please indicate the source
Preface: Under CentOS, Java is already installed, version 1.7, but there are no environment variables such as Java_home. So:
Export java_home=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9
Export classpath=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAV
recommended to modify this file, but in PROFILE.D below the new user's own configuration file. This will take effect as well.[Email protected] profile.d]# pwd/etc/profile.d[Email protected] profile.d]# touch jdk.sh[Email protected] profile.d]# VI jdk.shAdd the following to the jdk.sh file:Export java_home=/usr/java/jdk1.8.0_65Export path= $JAVA _home/bin: $PATHExport classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jarAfter saving, then execute the following command:[Email protected]
Export Java_home=/opt/java/jdk1.8.0_172export classpath=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _ Home/lib/tools.jarexport path= $PATH: $JAVA _home/bin Delete OpenJDKThe installed CentOS will bring openjdk, with the command java-version, will have the following information:" 1.6.0 " 1.6. 0-1.6. 0-b09, mixed mode)It is best to uninstall the OPENJDK before installing Sun's JDK.View Firs
Fedora 20 comes with openjdk, so if you install the official JDK, remove OPENJDK first, as follows:1:rpm-qa|grep jdk to view the current JDK situation.2:yum-y Remove Java java-1.7.0-openjdk* Uninstall OPENJDK, a process in which some additional software may be uninstalled for reasons of dependency.3: Go to Oracle websi
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.