First, install the configuration JDK
While many Linux distributions now come with OPENJDK, they are slightly different from ORACLE-JDK (SUN-JDK) during development. Typically, Java developers are developing with ORACLE-JDK as a standard. Here's a look at the JDK installation and configuration under Linux, and the Linux distribution used here is Ubuntu 12.04.
1. Download the JDK
The latest version is: Jdk8u25 (as of November 12, 2014), where we use version jdk7u71/72
: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Check Latest: http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Unzip the installation
We install the JDK to this path:/USR/LIB/JVM. If you do not have this directory, create a new directory
cd/usr/libsudomkdir JVM
After the establishment, enter the directory of the compressed package that you just downloaded, unzip to the newly created folder, and modify the name to facilitate management
sudo tar zxvf./jdk-7-linux-i586. tar. GZ -c/usr/lib//usr/lib/jvmsudomv jdk1. 7. 0_71/jdk7
3. Configure Environment Variables
VI /etc/profile
Add at the end of the open file
Export java_home=/usr/lib/jvm/jdk7export jre_home=${java_home}/jreexport CLASSPATH=.:${java _home}/lib/tools.jar:${jre_home}/lib/dt.jarexport PATH
Save the exit and enter the following command to make it effective
Source/etc/profile
4. Configure the default JDK
Some Linux distributions already have default JDK, such as OPENJDK. So in order to make the JDK version we just installed can be the default JDK version, we will also make the following configuration.
Execute the following command:
sudo update-alternatives--installsudo update-alternatives--Install -
Note: If the above two commands do not find a path problem, just restart the computer and repeat the above two lines of code is OK.
Execute the following code to see the current various JDK versions and configurations:
sudo update-alternatives--config javasudo update-alternatives--config javac
5. Testing
Open a terminal and enter the following command:
Java-version
Show Results:
" 1.7.0_71 " 1.7. 0_71-23.1-b03, Mixed mode)
Second, installation configuration IntelliJ idea 14
1. Download IntelliJ IDEA14
: http://www.jetbrains.com/idea/download/
2. Unzip the downloaded ideaiu-14.tar.gz to/usr/intellijidea
tar -zxvf ideaiu-14. tar. Gz-c/usr/intellijidea
3, it seems to configure the environment variables
Export IDEA_JDK=/USR/LIB/JVMJ/JDK1. 7. 0_71
4. Enter the bin directory under the installation directory to perform
./idea. SH
5 , enter the registration code after running.
Key:idea
Value:61156-yrn2m-5mncn-nz8d2-7b4ew-u12l4
6. Use idea to refer to
Http://www.cnblogs.com/yjmyzz/p/intellij-idea-13-getting-started.html
Installation of IntelliJ idea 14 under Linux