Eclipse Crash on Launch - JVM is complete. Exit Code = 2

I will do my best to make my situation as clear as possible. I tried to send an error message to an error message, but I could not find a topic about exit code=2 anywhere. I just found topics regarding different exit codes, and I'm trying to fix my problem in accordance with the recommendations given there - so far no luck. I am also new when it comes to any form of Linux (the distribution I use is Ubuntu).

Problem:

My eclipse will work on startup with the following error window:

 JVM terminated. Exit code=2 /usr/bin/java -Xms40m -Xmx384m -Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins -jar /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar -os linux -ws gtk -arch x86_64 -showsplash /usr/lib/eclipse//plugins/org.eclipse.platform_3.8.1.dist/splash.bmp -launcher /usr/lib/eclipse/eclipse -name Eclipse --launcher.library/usr/lib/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.dist/eclipse_1503.so -startup /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar --launcher.overrideVmargs -exitdata 670018 -vm /usr/bin/java -vmargs -Xms40m -Xmx384m -Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins -jar /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar 

There is a high chance that my problem is due to the lack of a proper version of Java.

I suspect this because:

My eclipse worked on my computer two days ago. Yesterday I had to use a web application for which a specific version of JRE was installed. Due to my lack of knowledge on Linux, I spent several hours uninstalling my current java JRE and JDK installations (so that I can install the right version) using several manuals that I found on the Internet (some of which included commands like sudo apt-get purge java* and other commands, including deletion, java and *). Today my Eclipse does not start.

When i started

 java -version 

there is no such file or directory in it, but web pages like http://www.java.com/en/download/testjava.jsp http://javatester.org/version.html do the job and say that my version java

 Vendor: Oracle Corporation Version: Java SE 7 Update 25 Operating System: Linux 3.5.0-34-generic Java Architecture: 64-bit 

installed using this method:

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

Can someone help me solve this problem? Fortunately, I have not done any important projects in my Eclipse yet, so I would not mind cleaning the installation if necessary.

To be completely honest, the main reason I need Eclipse for is the Remote Server Explorer option, so if someone knows a good IDE other than Eclipse that can provide an equally good Remote Server Explorer, that would be ideal high-speed solution.

+6
source share
5 answers

I got the same error message and solved it by running eclipse with the -clean option. To use the cleanup option: Edit the eclipse.ini file located in the Eclipse installation directory and insert -clean as the first line. After starting, remove the -clean option in the eclipse.ini file.

It worked for me ...

+2
source

Install \ Change the current jdk path in eclipse.ini.

 -vm C:\Java\JDK\1.8\bin\javaw.exe 

An example of the contents of an Ini file:

 -startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502 -product org.eclipse.epp.package.java.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vm C:\Java\JDK\1.8\bin\javaw.exe -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx1024m 
+2
source

The following environment variables were deleted and the Connect client was able to start successfully:

_JAVA_OPTIONS JAVA_TOOL_OPTIONS IBM_JAVA_OPTIONS

Operating system environment variables can be found by:

 From Desktop, right-click on My Computer icon-> Properties -> Advanced. Click the Environment variables button to remove the before-mentioned system environment variables. 
+1
source

In environment variables, check the value of the Path variable, it will refer to Oracle javapath, which would be the wrong version of java and could cause a problem. just delete "C: \ ProgramData \ Oracle \ Java \ javapath;" from the Path variable and try.

+1
source

We need to delete all the contents in the folder indicated in the error message. Please follow the link below, for example JVM Terminated

-1
source

Source: https://habr.com/ru/post/947674/


All Articles