Home  >  Article  >  Operation and Maintenance  >  What should I do if CentOS cannot open eclipse?

What should I do if CentOS cannot open eclipse?

coldplay.xixi
coldplay.xixiOriginal
2020-06-19 10:30:213169browse

What should I do if CentOS cannot open eclipse?

#What should I do if centos cannot open eclipse?

Solution to centos unable to open eclipse:

1. Install java

yum install java

yum (full name Yellow dog Updater, Modified), can automatically download and install gz packages from a designated server, can automatically handle dependencies, and install all dependent software packages at once, without the need to download them again and again. ,Install. yum provides commands to find, install, and delete a certain, a group, or even all software packages, and the commands are concise and easy to remember.

The command form of yum is generally as follows: yum [options] [command] [package ...]

The [options] are optional, and the options include -h (help) , -y (select all "yes" when prompted during the installation process), -q (do not display the installation process), etc. [command] is the operation to be performed, and [package...] is the object of the operation.

yum is the automatic installation system of Linux system

yum install only installs the specified software

2. Check the java version

java -version
 
java version "1.7.0_51"
OpenJDK Runtime Environment (rhel-2.4.5.5.el7-x86_64 u51-b31)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)

java -version Check the version of java

3. Download the eclipse-luna version compressed package and decompress it

Download addresshttp://www .eclipse.org/downloads/download.php?file=/technology/epp/dow...

Extract to the /opt directory

tar -zxvf eclipse-java-luna-SR1-linux-gtk-x86_64.tar.gz -C /opt

/opt means decompress to / In the opt directory, add -C, followed by the path

4. Use symbolic connection directories

ln -s /opt/eclipse/eclipse /usr/bin/eclipse

There is a space between eclipse and /usr

Note

Usage of symbolic links ln -s source file target file, -s means symbol (symbolic) soft link

Symbolic link is created by creating a special type of file It works. It will only generate a mirror image of a file in the location you selected. Its function is to establish a synchronized link for a certain file in another location. When we need to use the same file in different directories At this time, we don't need to put a file that must be the same in every required directory. We only need to put the file in a fixed directory, and then use the ln command to link it in other directories. , no need to repeatedly occupy disk space. It is similar to the shortcut keys under Windows, so you can open the software without typing commands in the terminal.

If you use ls to view a directory and find that there is an @ symbol after some files, it is a file generated with the ln command. Use the ls -l command to view it, and you can see the displayed The path of link

The command means to create a synchronization connection in the /usr/bin/eclipse directory, and the source file is in the /opt/eclipse/eclipse directory

5. Create a desktop launcher

vim /usr/share/applications/eclipse.desktop

After vi opens, it will be a new file

Add the following code

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse 4.4.1
Comment=Eclipse Luna
Exec=/usr/bin/eclipse
Icon=/opt/eclipse/icon.xpm
Categories=Application;Development;Java;IDE
Version=1.0
Type=Application
Terminal=0

The above is the application that displays eclipse on centos program, and describe it, such as encoding method, naming, displayed icon, version, type

6. Check whether eclipse is added to the application

Just run eclipse!

Recommended tutorial: "centos tutorial"

The above is the detailed content of What should I do if CentOS cannot open eclipse?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn