How to make Eclipse to find my jdk in Linux?

℡╲_俬逩灬. 提交于 2019-12-05 05:02:41

If Eclipse isn't finding your JRE/JDK or finding the wrong version, add the following two lines to the begining of your eclipse.ini file:

-vm
[your-path-to-java-executable]

Another possible solution is to add your java bin path to your environment variable PATH in /etc/profile file. Something like this

sudo gedit /etc/profile

Go to the end of the file and add this line:

export PATH=$PATH:/path/to/your/jdk/bin/
Aglets

I had some issues with the other solutions, so the following is what I did:

1) Open a terminal window

2) Enter the eclipse sub-directory cd ~/eclipse

3) Execute: whereis java

4) Pick a jdk path that also has the jre as a sub-directory I chose: /usr/java/jdk1.8.0_102/bin/java which has a jre subdir: /usr/java/jdk1.8.0_102/jre

5) Create a symbolic link in the ~/eclipse sub-directory. The following is an example: ln -s /usr/java/jdk1.8.0_102/jre jre

Go to your jre path within JDK installation home and copy the jre directory under eclipse installation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!