How can I force Eclipse to use Sun Java?

与世无争的帅哥 提交于 2019-12-22 09:01:24

问题


Before installing Eclipse, I had OpenJDK as the default JVM. Recently I changed it to Sun Java.

I did this because Eclipse Helios was running really slow. Unfortunately, it is still slow... Do you have any ideas how to force it to use Sun Java?

I could reinstall Eclipse, however I have already installed the Android SDK, so I would have to install that again. After all, I don't think that's the correct way of solving the problem. I'm using Ubuntu 10.10.

$ java -version  
java version "1.6.0_22" 
Java(TM) SE Runtime Environment (build1.6.0_22-b04) 
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

I would be grateful for any help.


回答1:


You can tell Eclipse which VM to use using -vm command line args.

See Eclipse wiki for example usage




回答2:


Edit $ECLIPSE_HOME/eclipse.ini and add the following before the vmargs option.

-vm
/opt/path/to/sun-jdk-1.6.0.02/bin/java


来源:https://stackoverflow.com/questions/4706341/how-can-i-force-eclipse-to-use-sun-java

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