Home > Operation and Maintenance > Linux Operation and Maintenance > What to do if eclipse cannot find jdk in linux

What to do if eclipse cannot find jdk in linux

WBOY
Release: 2022-07-15 11:06:05
Original
2509 people have browsed it

Solution: 1. If the jdk environment variable is not configured or the jdk configuration environment variable is incorrect, use "vi /etc/profile.d/java.sh" to reconfigure the jdk environment variable; 2. If it is caused by a particularly high version of jdk in the system, just uninstall the openjdk that comes with the machine.

What to do if eclipse cannot find jdk in linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What to do if eclipse cannot find jdk in Linux

Error message:

What to do if eclipse cannot find jdk in linux

Error reason:

1: The jdk environment variable is not configured (reinstalled the system)

2: The jdk configuration environment variable is incorrect

3: The system has a particularly high version of jdk (some Linux systems will Comes with openjdk, such as Ubuntu, Debian, etc.) resulting in the inability to correctly find the environment variable configuration information of jdk

Solution:

1, 1 and 2 Just reconfigure the jdk environment variables.

Configure jdk environment variables

vi  /etc/profile.d/java.sh
Copy after login

Use java -version to determine whether the environment variable configuration is successful.

The following content appears That is normal:

What to do if eclipse cannot find jdk in linux

2, 3: Uninstall the openjdk that comes with the machine

What to do if eclipse cannot find jdk in linux

Another possibility is that the environment variables are configured incorrectly. You can directly modify the eclipse.ini file in the eclipse installation directory.

Add your jre path under opfile to **/jre/bin You can

recommend learning:Linux video tutorial

The above is the detailed content of What to do if eclipse cannot find jdk in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template