Eclipse wont work [duplicate] - eclipse

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Cannot run Eclipse; JVM terminated. Exit code=13
i just downloaded "Eclipse IDE for Java Developers".
After unzipping and editing eclipse.ini the program gets terminated (exit code 13) and shows me the following error message:
more details:
im using windows 7 64 bit.
downloaded Eclipse IDE for Java Developers 64 bit for windows.
installed java jdk 7.0.4 (in advance)
installed sdk for android. (in advance)
i followed instructions about editing eclipse.ini and adding the pathway to the javaw.exe
this is my eclipse.ini:
-startup
plugins\org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-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:\Program Files (x86)\Java\jdk1.7.0_04\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx384m

If you downloaded a 64 bit package of Eclipse, then your Java VM must be 64 bit (and that is independent of your Windows bitsize). But you point to a JVM for 32 bit using the Program Files (x86) path.
Please download and install the 64 bit Java instead and point to that location afterwards in your eclipse.ini.

Have you tried to include the VM path in double-quotes like:
-vm "C:\Program Files (x86)\Java\jdk1.7.0_04\bin\javaw.exe"
Then you should try to exchange the backslashes by slashes:
-vm "C:/Program Files (x86)/Java/jdk1.7.0_04/bin/javaw.exe"
Instead of manipulating your eclipse.ini file, you could define a startup shortcut or batch file for it. Contents could be:
<path to eclipse>\eclipse.exe -vm "c:\Program Files (x86)\Java\jdk1.7.0_04\bin\javaw.exe"
And yes, your ini file was one of 64bit eclipse distro ...

Related

Eclipse Birt JVM Terminated Exit code = -1

I downloaded birt-report-designer-all-in-one-2_5_0.
enviornment is windows 7, 8gb memory, 64bit OS and jdk1.6.0_45(64 bit)
But while launching , throwing this error
My eclipse.ini is
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
-vmargs
-Xms512m
-Xmx1024m
-vm D:\java\jdk1.6.0_45\bin\javaw.exe
Note: the same eclipse which is working perfectly fine in my colleague's machine(with exactly same configuration)
Does anyone have other possible solutions?
This is fixed by installing 32 bit jdk 1.6 (uninstall 64 bit jdk)and pointing JAVA_HOME to this installed folder

Eclipse, exit code 13

I am using java 1.6. I have 64 bit W7OS. When I start Eclipse, I receive the exit code=13 error message.
I have seen some solutions for this and I went into the eclipse.ini file and added in the path to java 1.6. This is the .ini file now. I added in the '-vm' and the following line of C:...
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130521-0416
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:\Program Files\Java\jre6\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
I understand that the Internet thinks that this has to do with my OS being 64-bit and Eclipse trying to run 32 bit version or something, but I do not understand the solutions given for that. What should I do?
Thank you in advance.
You don't have to reinstall java.
Go to C:\Program Data\Oracle\java and check the path the shortcuts java, javaw and javaws are pointing to.
If the shortcuts are not pointing to the correct 64-bit java path, delete the shortcuts and create new ones with the same name and change the target location of the program to the 64bit java (jdk\bin{java or javaws or javaw}) location.
I had this problem and was generated by the symlinks in C:\ProgramData\Oracle\Java\javapath the javaw symlink was pointing to the 32bit version.
I removed and created a new javaw symlink whith this command on the command prompt running as admin: mklink \javaw "C:\Program Files\Java\jdk1.8.0_60\bin"
The last arg og the command is where 64bit javaw is placed.
Hope this helps!

Eclipse.exe icon vanishes before launching

I have downloaded eclipse.exe.When I click the icon eclipse icon disappears.
the eclipse.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.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
By running the following command on command prompt
eclipse -vm C:\Program Files\Java\jdk1.6.0_27\jre\bin\javaw.exe
I am getting a error.
java was started but returned exit code=1
I cannot determine what's wrong from the information given, but here are some things to check/try:
If you're running a 64-bit Windows, chances are you have installed a 64bit JDK and try to use it with 32bit Eclipse. If this is the case, you either need to get a 64bit version of Eclipse or install a 32bit JDK and point Eclipse to that (in 64-bit Windows 7, the 32-bit stuff is under "C:\Program Files (x86)").
To get more information what is causing the failure to start, locate the eclipse log -file, it should contain more information about what goes wrong in the start up. I don't remember the precise location, but it could have been something like Eclipse root/configuration/ OR workspace root/.metadata/. You can also start eclipse from command prompt with parameter -consoleLog, in which case the error message should be printed straight out to your command prompt.
You could also try starting Eclipse with parameter -clean, this flushes some configuration stuff and can sometimes help, if Eclipse seems to crash constantly (but usually you get to the workspace before it does).

Eclipse JVM configuration

Background: I've got a new eclipse installation and have installed the m2eclipse plugin. After startup m2eclipse generates the message:
Eclipse is running in a JRE, but a JDK
is required
Following the instructions from here I've changed the eclipse.ini file to use the JDK JVM:
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-vm
"C:\Program Files\Java\jdk1.6.0_16\bin\javaw.exe"
After restarting eclipse however, I still get the message saying its running under the JRE and not the JDK.
Looking at the eclipse configuration via Help -> About Eclipse -> Installation Details -> Configuration it seems like eclipse is picking up the JVM configuration details from somewhere else:
...
-vm
C:\Program Files (x86)\Java\jre6\bin\client\jvm.dll
eclipse.home.location=file:/C:/Program Files (x86)/eclipse/
eclipse.launcher=C:\Program Files (x86)\eclipse\eclipse.exe
eclipse.p2.data.area=#config.dir/../p2/
eclipse.p2.profile=epp.package.jee
eclipse.product=org.eclipse.epp.package.jee.product
eclipse.startTime=1252669330296
eclipse.vm=C:\Program Files (x86)\Java\jre6\bin\client\jvm.dll
eclipse.vmargs=-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-vm
"C:\Program Files\Java\jdk1.6.0_16\bin\javaw.exe"
-XX:MaxPermSize=256m
...
My question is where is the first -vm argument coming from and how can I remove or change it?
Thanks
Update: I have updated the eclipse.ini file as per VonC's answer. I'm now getting an error when launching eclipse saying:
A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: "C:\Program Files\Java\jdk1.6.0_16\bin\javaw.exe"
I've confirmed that the path is correct and can be executed via the command line.
Complete eclipse.ini below:
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
"C:\Program Files\Java\jdk1.6.0_16\bin\javaw.exe"
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
Solution: it seems like there was still something wrong with the eclipse.ini file. I replaced it completely with the settings given by VonC in the post he linked and eclipse is now starting properly and using the correct JVM. Full eclipse.ini below for anyone else with the same problem:
-showlocation
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
384m
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-vm
C:\Program Files (x86)\Java\jdk1.6.0_16\jre\bin\client\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms128m
-Xmx384m
-Xss4m
-XX:PermSize=128m
-XX:MaxPermSize=128m
-XX:CompileThreshold=5
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing
-Dcom.sun.management.jmxremote
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=C:/jv/eclipse/mydropins
See:
eclipse.ini for 3.4 or
eclipse.ini for 3.5
for an example of parameters order.
-vm should be before -vmargs
Update 6 years laters (2015)
E Riz mentions in the comments that the new Eclipse Installer will detect the JVM for you, or propose ones to download.
Unbelievable, the solution to this problem for me has nothing to do with slashes, backslashes, quotes, spaces, jre, jdk, jvm, javaw, ....
The answer is that you have to have a line break between -vm and the path.
So in the eclipse.ini file:
THIS WILL NOT WORK:
-vm C:\java\jdk\bin\javaw.exe
BUT THIS WILL:
-vm
C:\java\jdk\bin\javaw.exe
I think your machine is 64bit windows?
I cannot see a 64bit windows version of eclipse in the site. So only 32 bit might be available.
Are you sure you have a 32bit JDK installed in your machine?
Just a thought...
If you're using Windows, right click on your eclipse shortcut and select Properties, in the Shortcut tab you can change what's in the Target: box to specify the jdk. I use
"C:\Program Files\eclipse-jee-galileo-sr1 (3.5.1)\eclipse.exe" -vm "C:\Program Files\Java\jdk1.6.0_16\bin\javaw.exe" -vmargs -Xmx1024m -XX:PermSize=256M -XX:MaxPermSize=512M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode
For some reason I couldn't get it to use the jdk when I tried editing the eclipse.ini file.
Howto start eclipse in JDK?
This also addressed in Eclipse documentation:
https://wiki.eclipse.org/Eclipse.ini#-vm_value:_Windows_Example
My issue was that
-vm
"C:\Program Files\Java\jdk1.7.0_67\jre\bin\javaw.exe"
the path was in quotes, when i removed the quotes it worked:
-vm
C:\Program Files\Java\jdk1.7.0_67\jre\bin\javaw.exe
You should mention the full path of javaw.exe after -vm argument without using double quotes, i.e. "", each of -vm and the path has to be in different lines and -vm must be before -vmargs. For example:
-vm
C:\Program Files\Java\jrockit-jre1.6.0_45-R28.2.7\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
-XX:+UnlockDiagnosticVMOptions
-XX:MaxClassBlockMemory=75M
I solve this question.
When you create a Maven Project in Eclipse maybe the text file encoding in this project's properties and the project.build.sourceEncoding in the pom.xml was not the same. When you build this project it would report "Unable to locate the Javac Compiler in:..." error, too.
For example, my text file encoding was GBK and project.build.sourceEncoding was UTF-8 so this error happened. I just modified the text file encoding to UTF-8.

How do I set the eclipse.ini -vm option?

I installed the Maven plugin for Eclipse, and then I got an error like below:
please make sure the -vm option in eclipse.ini is pointing to a JDK
How do I use the -vm option to point to my JDK in eclipse.ini?
My solution is:
-vm
D:/work/Java/jdk1.6.0_13/bin/javaw.exe
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256M
-framework
plugins\org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
eclipse.ini file must have -vm on the first line and a path on the second line. Don't try to put everything into one line!
-vm
C:\Program Files\Java\jdk1.6.0_07\bin\javaw.exe
Anything after the "vmargs" is taken to be vm arguments. Just make sure it's before that, which is the last piece in eclipse.ini.
There is a wiki page here.
There are two ways the JVM can be started: by forking it in a separate process from the Eclipse launcher, or by loading it in-process using the JNI invocation API.
If you specify -vm with a path to the actual java(w).exe, then the JVM will be forked in a separate process. You can also specify -vm with a path to the jvm.dll so that the JVM is loaded in the same process:
-vm
D:/work/Java/jdk1.6.0_13/jre/bin/client/jvm.dll
You can also specify the path to the jre/bin folder itself.
Note also, the general format of the eclipse.ini is each argument on a separate line. It won't work if you put the "-vm" and the path on the same line.
-vm
C:\Program Files\Java\jdk1.5.0_06\bin\javaw.exe
Remember, no quotes, no matter if your path has spaces (as opposed to command line execution).
See here: Find the JRE for Eclipse
My solution for Ubuntu Linux:
-vm
/home/daniel/Downloads/jdk1.6.0_17/bin
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.2.R36x_v20101019_1345
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
I am not sure if something has changed, but I just tried the other answers regarding entries in "eclipse.ini" for Eclipse Galileo SR2 (Windows XP SR3) and none worked. Java is jdk1.6.0_18 and is the default Windows install. Things improved when I dropped "\javaw.exe" from the path.
Also, I can't thank enough the mention that -vm needs to be first line in the ini file. I believe that really helped me out.
Thus my eclipse.ini file starts with:
-vm
C:\Program Files\Java\jdk1.6.0_18\bin
FYI, my particular need to specify launching Eclipse with a JDK arose from my wanting to work with the m2eclipse plugin.
You have to edit the eclipse.ini file to have an entry similar to this:
C:\Java\JDK\1.5\bin\javaw.exe (your location of java executable)
-vmargs
-Xms64m (based on you memory requirements)
-Xmx1028m
Also remember that in eclipse.ini, anything meant for Eclipse should be before the -vmargs line and anything for JVM should be after the -vmargs line.
The JDK you're pointing to in your eclipse.ini has to match the Eclipse installation.
If you are running a 32- or 64-bit Eclipse, use a 32 or 64-bit Java JDK, respectively.
I'd like to share this little hack:
A click on the Eclipse's icon indicated a problem with the JRE.
So, I put this command in the destination field of the icon's properties:
C:\...\eclipse.exe -vm c:\'Program Files'\Java\jdk1.7.0_51\jre\bin\javaw
Thinking that the "'" would solve the problem with the space in the path.
That did not function. Then, I tried this command:
C:\...\eclipse.exe -vm c:\Progra~1\Java\jdk1.7.0_51\jre\bin\javaw
with success
Assuming you have a jre folder, which contains bin, lib, etc files copied from a Java Runtime distribution, in the same folder as eclipse.ini, you can set in your eclilpse.ini
-vm
jre\bin\javaw.exe
I know that there exists a command line option, -vm, to specify the path to the executable of the Java runtime. This may be the same as in eclipse.ini.
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms2000m
-Xmx3512m