Hadoop [Lesson 7]: Linux installation and configuration of Eclipse

1. Download Eclipse

First enter the Eclipse official website to download the Eclipse IDE for Java EE Developer version available for Linux. (It is recommended not to download a newer version)
(1) Choose: Download Packages
Download Eclipse
(2) Choose: Older Versions
Insert picture description here
(3) Choose: Kepler
Insert picture description here
(4) Choose: SR2 Packages
Insert picture description here
(5) Choose: Linux x86 of Eclipse IDE for Java EE Developers -64 version download
Insert picture description here
(6) successfully downloaded
Insert picture description here

2. Upload the downloaded installation package to the virtual machine

Refer to the blog [VMware] Xshell remote terminal to transfer files !

3. Configure Eclipse in the virtual machine

(1) Open the terminal, enter root, and enter the following commands:

# tar  -zxvf  eclipse-jee-kepler-SR2-linux-gtk-x86_64.tar.gz  -C  /usr/local/

Wait for Eclipse to decompress...
(2) Open the folder where Eclipse is located, and open the eclipse under the eclipse directory. The
following error will appear:
Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse.
No java virtual machine was found after searching the following locations:…
At this time, Eclipse needs to be configured with its JDK.
①First enter the directory where eclipse is located in the terminal

# cd /usr/local/eclipse/

②Create a new folder jre

# mkdir jre

③Enter the folder directory

# cd jre

④Use the ln command to create a JDK link in this directory for Eclipse to use (ln -s directory where your JDK is located/bin bin)

# ln -s /usr/local/java/jdk1.8.0_221/bin/ bin

At this point Eclipse can be opened!
(3) The initial startup will let you set the workspace directory, usually
Insert picture description here
after you do not need to change it , you can find this directory in the main folder of the file system, and all the Java projects you create are here.

4. Create a new Java project

(1) Create a new java project
①Select: File→New→Project
Insert picture description here
②Select: Java Project
Insert picture description here
③Enter the name of the Java project
Insert picture description here
④Created successfully
Insert picture description here
(2) The java class under the new Java project
Insert picture description here
can then be used in the virtual machine with Eclipse !

Over!

Guess you like

Origin blog.csdn.net/qq_41315788/article/details/109261541