Ubuntu Builds Java development environment

Source: Internet
Author: User

Ubuntu builds Java development environment to install Java online
sudo add-apt-repository ppa:webupd8team/javasudo apt-get updatesudo apt-get install oracle-java8-installersudo apt-get install oracle-java8-set-default

Run again later

java -version

If you have an output similar to the following, you're done! If not, continue to Google or Baidu Bar.

"1.8.0_25"1.8.06425.25-b02, mixed mode)
Installing Java Offline

First you have to download the installation package here.

Suppose you download the jdk-8u25-linux-x64.tar.gz now and extract the folder jdk1.8.0_25.

Execute the following command to move Java to the Lib directory.

sudo mkdir -p /usr/lib/jvm/jdk1.8.0_25/sudo mv jdk1.8.0_25/* /usr/lib/jvm/jdk1.8.0_25/

Next, use the update-alternatives command to configure Java.

sudo"/usr/bin/java""java""/usr/lib/jvm/jdk1.8.0_25/bin/java"1sudo"/usr/bin/javac""javac""/usr/lib/jvm/jdk1.8.0_25/bin/javac"1sudo"/usr/bin/javaws""javaws""/usr/lib/jvm/jdk1.8.0_25/bin/javaws"1

The execution results are as follows.

update-alternatives: using /usr/lib/jvm/jdk1.8.0in 自动模式update-alternatives: using /usr/lib/jvm/jdk1.8.0in 自动模式update-alternatives: using /usr/lib/jvm/jdk1.8.0in 自动模式

Finally, perform the java-version and check the installation.

"1.8.0_25"1.8.06425.25-b02, mixed mode)
Install Eclipse

Note that eclipse wants to download JEE, not standard, remember.

First download eclipse.

Then unzip to /opt/eclipse . Eclipse is now open, but the icon cannot be opened after it has been locked to the launcher.

/usr/share/applicationsCreate a new file under the directory eclipse.desktop . The contents are as follows.

[Desktop Entry]Type=ApplicationName=eclipseComment=Eclipse IDEExec=/opt/eclipse/eclipseIcon=/opt/eclipse/icon.xpmCategories=DevelopmentTerminal=false

This file is then given executable permissions.

sudo chmod +x eclipse.desktop

At this point, you can start eclipse directly in the launcher.

If you think my blog to help you, welcome to share ~ I'd better have a tea egg oh ~

Ubuntu Builds Java development environment

Related Article

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.