How to install the JDK and Eclipse configuration method under Linux

Source: Internet
Author: User
Tags chmod gtk file permissions

First, install the Java development environment

1,jdk-6u33-linux-i586.bin, after downloading the original directory is:/home/downloads/

2, will download the file to place you need, here I put in

CP JDK-6U33-LINUX-I586.BIN/USR/SHARE/JAVAJDK

Note: usr: is unix software resoure, the main place some common software

3, CD/USR/SHARE/JAVAJDK change the file permissions, so that it can run:

sudo chmod u+x jdk-6u33-linux-i586.bin

Note: chmod is the right to change files, because you have just downloaded the file can not be executed by default, so you should add

4. Run the file: sudo./jdk-6u33-linux-i586.bin, so far,

Note: for the suffix name. bin can be run directly

/usr/share/javajdk

There is a bin package jdk1.6.0_37 under the directory, and a folder with the same name as the uncompressed file.

5, enter in the terminal:

sudo gedit/etc/environment

Add the following at the end of the file:

Export java_home=/usr/share/javajdk/jdk1.6.0_33

Export JRE_HOME=/USR/SHARE/JAVAJDK/JDK1.6.0_33/JRE

Export classpath=.: $CLASSPATH: $JAVA _home/lib: $JAVA _home/jre/lib

6, configure JDK environment variables in profile:

sudo gedit/etc/profile,

and add the following lines:

#set Java Environment

Export java_home=/home/apple/javaidetools/javajdk/jdk1.6.0_31

Export JRE_HOME=/HOME/APPLE/JAVAIDETOOLS/JAVAJDK/JDK1.6.0_31/JRE

Export classpath=.: $CLASSPATH: $JAVA _home/lib: $JAVA _home/jre/lib

Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH: $HOME/bin

7, log off the user, and then enter Java-version in the terminal to try

Remember to log off the user again

II Install Eclipse:

Download to website: eclipse-java-galileo-sr1-linux-gtk.tar.gz

After decompression, you can view the root directory

(2) eclipse-sdk-3.2.1-linux-gtk.tar.gz this file into the/opt directory (with the root of the MV _ _ _ Statement to move into the OPT folder)

Note: Opt is generally used to place third party software, so it is recommended to put here

(3) Enter/opt/in the shell and execute:

TAR-ZXVF eclipse-java-juno-sr1-linux-gtk.tar.gz statement, unzip download file

(4) In the shell, enter the Eclipse directory, cd/opt/eclipse

Set file Eclipse execution rights: Chown-r Root: Your username eclipse

(5) Create a desktop Connection

sudo gedit/usr/share/applications/eclipse.desktop

Enter the following code:

[Desktop Entry]

Name=eclipse

Comment=eclipse IDE

Exec=/home/fish/java/eclipse/eclipse

icon=/home/fish/java/eclipse/icon.xpm

Terminal=false

Type=application

Categories=application;development;

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.