table of Contents
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
(2) Choose: Older Versions
(3) Choose: Kepler
(4) Choose: SR2 Packages
(5) Choose: Linux x86 of Eclipse IDE for Java EE Developers -64 version download
(6) successfully downloaded
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
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
②Select: Java Project
③Enter the name of the Java project
④Created successfully
(2) The java class under the new Java project
can then be used in the virtual machine with Eclipse !
Over!