Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error starting Eclipse in Linux: "JVM terminated. Exit code=13"

Tags:

linux

eclipse

I am trying to run eclipse and encounter the errors. I am using Kubuntu as my OS and when I typed java -version in terminal I got 'java version "1.6.0_23"'. I have openJDK installed but I am not sure what can I do next. Any thoughts? Thanks.

ERROR:

   JVM terminated. Exit code=13
    /usr/bin/java
    -Dosgi.requiredJavaVersion=1.5
    -XX:MaxPermSize=256m
    -Xms40m
    -Xmx384m
    -jar /home/lucky/Downloads/eclipse//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
    -os linux
    -ws gtk
    -arch x86
    -showsplash
    -    launcher /home/lucky/Downloads/eclipse/eclipse
    -name Eclipse
    --launcher.library /home/lucky/Downloads/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.2.R36x_v20101019_1345/eclipse_1310.so
    -startup /home/lucky/Downloads/eclipse//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
    -exitdata 5cf8058
    -product org.eclipse.epp.package.php.product
    -vm /usr/bin/java
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -XX:MaxPermSize=256m
    -Xms40m
    -Xmx384m
    -jar /home/lucky/Downloads/eclipse//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar 

My eclipse.ini

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.2.R36x_v20101019_1345
-product
org.eclipse.epp.package.php.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx384m
like image 542
FlyingCat Avatar asked Mar 09 '12 14:03

FlyingCat


People also ask

How do I fix exit code 13 in eclipse?

This error occurs because your Eclipse version is 64-bit. You should download and install 64-bit JRE and add the path to it in eclipse.

How do I fix java exit code 13?

If you have installed 64 bit version of java jdk and 32 bit version of eclipse ide or vice versa , then you will get this error. You will get rid of this error by just downloading the correct version of java jdk and eclipse ide.


4 Answers

Looking at the paths in the error it seems that you are not using eclipse from the ubuntu repositories (that's fine imo).

  1. Check if the jvm is 64 or 32 bit. java -version will tell you. If you find this is a 64-bit jvm then go back to eclipse.org and download a eclipse version for 64-bit. You have eclipse for a 32-bit jvm. See your error message where it says -arch x86

  2. Try to start eclipse from a shell using the -vm parameter. On ubuntu you can find the installed jre/jdk's under /var/lib/jvm/. E.g.:

./eclipse -vm /var/lib/jvm/sun-java6-jdk/bin

You could add this parameter to your eclipse.ini file.

Helps?

This could be of interest as well: Eclipse starting error of JVM terminated. Exit code=13 after upgrading Ubuntu updates

like image 53
MartinK Avatar answered Sep 17 '22 05:09

MartinK


I have found solution for errors 13 and 1 in following video:

Eclipse Error 13 and Error 1

Both errors are fixed by editing eclipse.ini in eclipse directory.

Error 13 is fixed by adding complete path to javaw. In my case it is:

-vm
c:\Program Files\Java\jdk1.8.0_45\bin\javaw.exe

Error 1 is caused by setting arguments for virtual machine before setting vm. itself. This means two lines we just added must be before the

-vmargs

line.

Done.

like image 21
Empty_Mind Avatar answered Sep 21 '22 05:09

Empty_Mind


Specify the JVM you want to use in your eclipse.ini file, as described in http://wiki.eclipse.org/Eclipse.ini

I'd recommend using the JDK from Oracle; I'm not sure the current state of compatibility between Eclipse and OpenJDK.

like image 29
E-Riz Avatar answered Sep 20 '22 05:09

E-Riz


This might sound a little odd but I have stumbled upon the same problem (StS 3.2.2 on Juno 4.2.2 with Java 7 u25 both 64 bit on win7) and nothing seemed to work, then I moved my sts out of the directory I originally installed it (d:#sts\springsource\sts-3.2.0.RELEASE) to (d:\springsource\sts-3.2.0.RELEASE), and now it works. I kept it in both places and if I want to start it from its original location it promptly crashes with exit code 13, if I start it from the new place it works just fine.

So it might be that eclipse does not like hash marks, or it was "too far away" from root and some of the files paths-es went beyond 256 char. (Nonetheless its quite odd the get exit code 13 since in my case it had nothing to do with non-matching versions)

like image 26
Don Kartacs Avatar answered Sep 21 '22 05:09

Don Kartacs