[Zhuan] Ubuntu installs Java and Eclipse (config)

Source: Internet
Author: User
Tags gtk gz file

First, JAVA


Post a command first:
CD appsource/
mkdir Java
LS l
sudo tar-zxvf jdk-7u67-linux-x64.tar.gz-c./java/
CD Java
sudo mv./java/usr/lib/
cd/usr/lib/
Ls-l
CD Java
Ls-l
CD jdk1.7.0_67/
Ls-l
sudo gedit/etc/profile
sudo vi/etc/profile
Java-version #这是还没有重启
Source/etc/profile
Java-v #错误
Java-version #新版的是java--version
Source/etc/profile #临时让环境变量起作用

#set Java Environment
java_home=java_home=/usr/lib/java/jdk1.7.0_67
Export classpath=.: $JAVA _home/lib: $JAVA _home/jre/lib: $CLASSPATH
Export path= $JAVA _home/bin: $PATH

1. Create a Java folder to store the extracted Java. GZ file
2. Then move the Java folder to the/usr/lib/folder with sudo permissions
3. Then configure the Java environment variables
4, restart or urgent use is to use the Source/etc/profile command can temporarily call Java (temporarily do not want to restart the words)

Second, Eclipse
1. Download eclipse

Download the Linux version of Eclipse IDE for Java EE developers from official website http://www.eclipse.org/downloads/

Eclipse-sdk-3.7.2-linux-gtk.tar.gz

2. Decompression
$ TAR-ZXVF eclipse-sdk-3.7.2-linux-gtk.tar.gz
Extract it Out is an Eclipse folder
3. Move the folder to the installation directory
$ sudo mv eclipse/usr/local/
4. Start Eclipse
$/usr/local/eclipse/eclipse
5. Create a desktop link
$ sudo su
# Vim/usr/share/applications/eclipse.desktop

Write the following content
[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;
You can see the Eclipse icon under application-programming when you're done.

[Zhuan] Ubuntu installs Java and Eclipse (config)

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.