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.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
Error message:
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
Use java -version to determine whether the environment variable configuration is successful.
The following content appears That is normal:
2, 3: Uninstall the openjdk that comes with the machine
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!