Install JDK, configure Java environment variables
1. Download the JDK, the current version is jdk-8u101. Select the appropriate version for your system to download, download it and put it in the Download directory.
2. Then use Ctrl + Alt + t to open the terminal into the Download directory and extract it using the TAR-XF jdk-8u101-linux-x64.tar.gz command
3. Move the extracted jdk1.8.0_101 folder to the/opt/java folder: sudo mv jdk1.8.0_101//opt/java
4. Configure the Java environment variables:
Install VIM Editor: sudo apt-get install vim;
Use the command sudo vim ~/.BASHRC, and then add the following at the end of the file:
Export java_home=/opt/java/jdk1.8.0_101
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib
Export Path=${java_home}/bin: $PATH
Last saved. Enter the following command to make the system configuration file .bashrc effective immediately:source ~/.bashrc
5. Using the command java-version, if you see the Java version information, it means that the installation was successful.
Second, install Eclipse and create a shortcut
1. Download the Eclipse installation package, eclipse-jee-neon-1-rc3-linux-gtk-x86_64.tar.gz, Address: http://mirrors.ustc.edu.cn/eclipse/technology /epp/downloads/release/
2. Unzip the downloaded installation package, right-click → extract here, or command line: TAR-XF eclipse-jee-neon-1-rc3-linux-gtk-x86_64.tar.gz
3. Move the extracted folder Eclipse to/opt:sudo MV Eclipse/opt
4. Create Eclipse Desktop shortcut icon:
Use VIM to create a file named "Eclipse.desktop" in the user's desktop directory, and add the following:
- [Desktop Entry]
- Encoding=utf-8
- Name=eclipse Platfrom
- Comment=eclipse IDE
- Exec=/opt/eclipse/eclipse
- icon=/opt/eclipse/icon.xpm
- Terminal=false
- Startupnotify=true
- Type=application
- Categories=application;development;
then give the file a right, run the "chmod u+x eclipse.desktop" command, and the desktop will now have a shortcut to eclipse
If you cannot find the JVM error when you start Eclipse, restart the system to run again
Third, install IntelliJ Idea and create a shortcut
1. Download IntelliJ idea installation package, ideaiu-2016.2.4.tar.gz, Address: http://www.jetbrains.com/idea/download/
2. Unzip the downloaded installation package, right-click → extract here, or command line: TAR-XF ideaiu-2016.2.4.tar.gz
3. Move the extracted folder Eclipse to/opt:sudo MV Idea-iu-162.2032.8/opt
4. Now use the terminal to enter the decompression directory under bin子目录 , and then run the start command under Terminal:./idea.sh,启动Intellij Idea,然后锁定到启动器即可
Ubuntu 16.04 Configuring the Java Development environment