When opening Eclipse, a dialog opens and here is the message displayed in the dialog:
JVM terminated. Exit code=1
/usr/bin/java
-Xms256m
-Xmx1024m
-XX:MaxPermSize=256m
-jar /opt/marseclipse//plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
-os linux
-ws gtk
-arch x86_64
-launcher /opt/marseclipse/eclipse
-name Eclipse
--launcher.library /opt/marseclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.v20150602-1417/eclipse_1612.so
-startup /opt/marseclipse//plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.appendVmargs
-exitdata c78010
-data /root/workspace2
-application org.eclipse.cdt.managedbuilder.core.headlessbuild
-import /root/workspace2/ut
-vm /usr/bin/java
-vmargs
-Xms256m
-Xmx1024m
-XX:MaxPermSize=256m
-jar /opt/marseclipse//plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
Please guide!
okay so there seems to be a memory problem.You can go to config file and increase the Xms256m size to 512 or 1024 which ever works for you.And heap memory ie Xms256m depends on your physical memory of OS.So change accordingly.
You can change it by going to run configuration you want to customizeand open the tab Arguments and add -Xmx or Xms in the VM arguments section
Solved by myself. I run eclipse twice (first time to import project to new workbench, second time to open the new workbench) from the first workbench by call Runtime.getRuntime.exec(). I forgot to do process1.waitFor(), so the new workbench intended to be run twice at the same time, this is the root cause.
Related
I'm getting this problem when I start-up. I managed to get it working perfectly then I did a system restore (which brought me back to before I had it) and since then its not worked, though I re-installed it and did everything as I had before. According to the uninstall/change program menu I have Java 7 Update 75 (64-bit) and Java SE Development Kit 7 Update 75 (64-bit) installed.!
Thanks a lot guys!
JVM terminated. Exit code=2
C:\ProgramData\Oracle\Java\javapath\javaw.exe
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
-jar
C:\Users\Tom\Desktop\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
-os win32
-ws win32
-arch x86_64
-showsplash
C:\Users\Tom\Desktop\eclipse\\plugins/org.eclipse.platform_4.4.2.v20150204-1700\splash.bmp
-launcher C:\Users\tom\Desktop\eclipse\eclipse.exe
-name Eclipse
--launcher.library
C:\Users\Tom\Desktop\eclipse\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20150204-1316\eclipse_1608.dll
-startup
C:\Users\Tom\Desktop\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.appendVmargs
-exitdate 1f18_68
-product org.eclipse.epp.package.java.product
-vm C:\ProgramData\Oracle\Java\javapath\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xmsm40
-Xmx512m
-jar
C:\Users\Tom\Desktop\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
Answer can be found here - Eclipse: JVM terminated. Exit code=2
"The problem was resolved when I changed PATH variable by removing
C:\ProgramData\Oracle\Java\javapath;
In command prompt I also ran following commands:
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25
set PATH=C:\Program Files\Java\jdk1.8.0_25\bin;%PATH%
But I think the most important was to remove C:\ProgramData\Oracle\Java\javapath; from the PATH."
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!
I will do my best to make my situation as clear as possible. I tried googling the error message, but I haven't found any topic regarding exit code=2 anywhere. I only found topics regarding different exit codes, and I'm trying to fix my issue following the advice given there - no luck so far. Also I'm a newbie when it comes to any form of Linux (the distribution I'm using is Ubuntu).
Problem:
My eclipse crashes on launch with following error window popping up:
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 big posibility that my problem is related to lack of proper Java version installed.
I suspect this because:
I had eclipse running on my pc two days ago. Yesterday I had to use a web-application which required a specific version of JRE installed. Due to my lack of linux knowledge, I spent a few hours removing my current installations of java JREs and JDKs (so I could install the required version) using multiple guides that I found on the internet (some included commands like sudo apt-get purge java* and other commands including removing, java and *). Today my Eclipse wont launch.
When I run
java -version
it says no such file or directory, but the webpages like
http://www.java.com/en/download/testjava.jsp
http://javatester.org/version.html
do work and say that my java version is
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 please guide me how to solve this specific problem? Luckly I haven't made any important projects in my Eclipse yet so I don't mind purging the installation if necessary.
To be completely honest the main reason I need Eclipse for is the Remote Server Explorer option, so if anyone knows a good IDE other than Eclipse that can provide just as good Remote Server Explorer it would be a perfect-fast-temporary solution.
I got the same error message and solved it by starting eclipse with the -clean parameter.
To use the clean parameter:
Edit the eclipse.ini file located in your Eclipse install directory and insert -clean as the first line. Once started, remove the -clean parameter in the eclipse.ini file.
It worked for me...
Set\Change your current jdk path in eclipse.ini.
-vm
C:\Java\JDK\1.8\bin\javaw.exe
Sample Ini file contents:
-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
The following environment variables were removed and the Connect client was able to successfully launch:
_JAVA_OPTIONS
JAVA_TOOL_OPTIONS
IBM_JAVA_OPTIONS
The 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.
In the environment variables check the value of Path variable, it would have reference to the Oracle javapath which would be incorrect java version and may cause the issue. just remove "C:\ProgramData\Oracle\Java\javapath;" from the Path variable and try.
We need to delete all the content in the folder specified in the error msg.Please go through the link below for example JVM Terminated
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).
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.