Ubuntu 16.04 Configuring the Java Development environment

Source: Internet
Author: User

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:

    1. [Desktop Entry]
    2. Encoding=utf-8
    3. Name=eclipse Platfrom
    4. Comment=eclipse IDE
    5. Exec=/opt/eclipse/eclipse
    6. icon=/opt/eclipse/icon.xpm
    7. Terminal=false
    8. Startupnotify=true
    9. Type=application
    10. 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

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.