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)