Eclipse does not launch (Ubuntu) : JVM terminated. Exit code=2

牧云@^-^@ 提交于 2020-01-01 11:47:47

问题


  1. I install ubuntu 14.04 LTS (64bit)
  2. After that Install Eclipse Luno Standard for 64bit
  3. Install Jdk and follow all the step for setting jdk using following link,

    http://www.wikihow.com/Install-Oracle-Java-JDK-on-Ubuntu-Linux

  4. Then After I enable to start my eclipse it giving me a following Error,

    VM terminated. Exit code=2

     /usr/bin/java
     -Dosgi.requiredJavaVersion=1.6
     -XX:MaxPermSize=256m
     -Xms256m
     -Xmx1024m
     -jar   /home/eheuristic/Ecclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415- 2008.jar
     -os linux
     -ws gtk
     -arch x86_64
     -showsplash  /home/eheuristic/Ecclipse/eclipse//plugins/org.eclipse.platform_4.4.0.v20140925- 0400/splash.bmp
     -launcher /home/eheuristic/Ecclipse/eclipse/eclipse
     -name Eclipse
     --launcher.library  /home/eheuristic/Ecclipse/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1. 200.v20140603-1326/eclipse_1605.so
     -startup /home/eheuristic/Ecclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
    --launcher.appendVmargs
    -exitdata 208017
    -product org.eclipse.epp.package.java.product
    -vm /usr/bin/java
    -vmargs
    -Dosgi.requiredJavaVersion=1.6
    -XX:MaxPermSize=256m
    -Xms256m
    -Xmx1024m
    -jar  /home/eheuristic/Ecclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar 
    

I so much try to solve setting Environment variable but can't do, help me one suggest to how to solve it.


回答1:


First, I strongly recommend you use the webupd8 ppa

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Then to set it

sudo update-java-alternatives -s java-8-oracle 

The advantage is ease of updates.




回答2:


write in eclipse.in on the top of the file

-startu
-vm
/usr/local/jdk/jre/bin  

change path according to your system




回答3:


Had the same error. Solved it by:

sudo update-alternatives --config java

I started "using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode" - that was option 4, and it worked fine.

I am using Luna Service Release 2 (4.4.2).

Hope it helps someone somewhere.




回答4:


I know exactly how to solve your problem, go to search and put in environment, a prompt will come up and ask you to"edit environmental variables for your account" click that and a window will pop up. there will be the current paths which are running on the top (you should have your jdk version running mine is 1.8) and on the bottom part there will be paths too choose from. select (on the bottom part) the java path and delete it, then click okay. it should work




回答5:


I find my Stupid Solution ,

I trying install jdk that is support for 32 bit.

I downloads new jdk1.8.0_25 for 64 bit and follow the step, i got solutions.




回答6:


I had this same problem when trying to run Eclipse and Android Studio on Ubuntu with Java 9 . Solution: Install Java 8

sudo apt-get install oracle-java8-installer
and set it as default
sudo apt-get install oracle-java8-set-default

and voilà.



来源:https://stackoverflow.com/questions/26736164/eclipse-does-not-launch-ubuntu-jvm-terminated-exit-code-2

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