开发者

Eclipse is not starting

Eclipse starts from terminal but when i try to start it from gui then it says java runtime environment don't found.

Environment variables are:

JAVA_HOME="/opt/jdk1.6.0_20" PATH=$PATH:"/opt/jdk1.6.0_20/bin"

And one more thing so far i normally copy jre folder from jdk to eclipse directory, which works fine but what is act开发者_运维百科ual way. i mean this won't be standard way to do that.

Thanks in advance


And one more thing so far i normally copy jre folder from jdk to eclipse directory, which works fine

No, this is not necessary or desirable. You should not have to do any such thing.

If you open up a command shell and type "java -version", what comes back?


Edit eclipse.ini (from the Eclipse folder) and add the following at the beginning:

-vm
C:/Java/jdk1.6.0_22/bin

where C:/Java/jdk1.6.0_22/bin should be your path to the java bin directory. Keep it on two lines.


Well the reason eclipse won't start from GUI despite of the fact that environment variables are set, is:

You have set the variable in bashrc or bash_profile, these two are for the specific logged in user, but you also need to set in etc/profile which is for all the users.

So once you set the PATH and JAVA_HOME in etc/profile it will launch from GUI.

Worked for me! ;)


Faced the same problem and the suggestion addressed my problem! After setting /etc/profile as indicated in the link below, I logged out and logged back in for GUI based Eclipse to work. http://www.cyberciti.biz/faq/linux-unix-set-java_home-path-variable/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜