Setup OPENJDK development environment on Ubuntu DESKTOP__OPENJDK

Source: Internet
Author: User
1. Install ubuntu Desktop on physical machine or VM

You can download Ubuntu 16.04.2 LTS (recommend) from Https://www.ubuntu.com/download/desktop 1.1. Use source of USTC, it's faster in

sudo cp/etc/apt/sources.list/etc/apt/sources.list.bak
sudo sed-i ' s/archive.ubuntu.com/mirrors.ustc.edu.cn/g ' /etc/apt/sources.list
1.2. Update system
sudo apt-get update
sudo apt-get-y dist-upgrade
sudo apt-get autoclean
reboot
2. Install Tools 2.1. Install Vim
sudo apt-get install vim
2.2 Install OpenJDK
sudo dpkg-l | grep java
#uninstall java if exsit
sudo apt-get install openjdk-8-jdk
java-version
2.3 Install maven
sudo apt-cache search maven
sudo apt-get install maven
mvn-v

cofig Environment

sudo vim/etc/environment

Export Java_home= "/usr/lib/jvm/java-8-openjdk-amd64/jre"
Export M2_home= "/usr/share/maven"
Path= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

Source/etc/environment
echo $PATH
java-version
mvn-v
2.4. Install git
sudo apt-cache search git
sudo apt-get install git
vim ~/.gitconfig
[Core]
    Autocrlf = input
    Safecrlf = True
[user]
    email = xxx@xxx.com
    name = XXX
[alias]
    LG = Log--color-- Graph--pretty=format: '%cred%h%creset-%c (yellow)%d%creset%s%cgreen (%CR)%c (bold blue) <%an>%creset '-- Abbrev-commit
[color]
    UI = True
[http]
    sslverify = False
2.5. Install Eclipse

Download and run eclipse
Import and config project in eclipse

sudo mv ~/download/eclipse/usr/local
sudo vim/usr/share/applications/eclipse.desktop
[Desktop Entry]
Name=eclipse
comment=eclipse SDK
encoding=utf-8
exec=/usr/local/eclipse/eclipse 
icon=/usr/ LOCAL/ECLIPSE/ICON.XPM
terminal=false
type=application
categories=application;development;

Applications Search Eclipse

Enjoy it.

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.