I just followed the Eclipse websites links to download the latest version for Debian, and after running from the terminal
$ ./eclipse-inst
It goes through the installation process but returns
JVM terminated. Exit code=1
/usr/lib/jvm/java-9-openjdk-amd64/bin/java
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
-Duser.dir=/root/eclipse/java-photon/eclipse
-jar /root/eclipse/java-photon/eclipse//plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /root/eclipse/java-photon/eclipse/eclipse
-name Eclipse
--launcher.library /root/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.700.v20180518-1200/eclipse_1705.so
-startup /root/eclipse/java-photon/eclipse//plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
--launcher.appendVmargs
-exitdata eb0026
-product org.eclipse.epp.package.java.product
-vm /usr/lib/jvm/java-9-openjdk-amd64/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
-Duser.dir=/root/eclipse/java-photon/eclipse
-jar /root/eclipse/java-photon/eclipse//plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
I wasn't able to search the error but it may be because the error is so massive that I don't know which parts of it to search for. I tried searching the initial segment of the error and didn't find much that was useful. What I did find indicated editing the eclipse.ini file, so I did that, and it now looks like the following: [Edit: after the advice of a proposed answer I updated the file to look like the following]
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.dist
-showsplash
org.eclipse.platform
#--launcher.XXMaxPermSize
#256m
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-9-openjdk-amd64/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
--add-modules=ALL-DEFAULT
-Xms40m
-Xmx384m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
However, after making this edit I see no difference in the error message that the installer brings up.
I believe it's also possible to get Eclipse not by downloading the installer but by using a repo--but as I understand it, this repo usually has a slightly outdated version of Eclipse. I could certainly be wrong, but I believe I've seen advice that it's best to download and use the installer.
When I run java -version it returns
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
When I try to run Eclipse it pops up an error message
An error has occurred. See the log file
/home/bob/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1533437446117.log.
And interestingly, the folder in which the file is supposed to exist, doesn't exist.
This looks like a prerelease build of Java 9, and as such might not support the command line arguments expected in the actual release. Java 9 is current until the end of September, so try the released version if you can.
you have to adjust the eclipse.ini in order to configure Eclipse for Java 9 ...for example:
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-9-openjdk-amd64/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
--add-modules=ALL-SYSTEM
or use Java 8 ...
I just installed Eclipse on Linux, but it does not start. What is the problem?
Quite often, Eclipse will not work properly with non-Sun or non-IBM JVMs. These issues are usually related to Blackdown or GCJ. Eclipse has a list of reference platforms that it is tested against which you should try to match against. Try installing one from Sun, IBM, or BEA (eg., Sun JDK 5.0, IBM JDK 5.0, or BEA JRockit 5.0). Version 6 of OpenJDK works too, particularly with Fedora Eclipse.
Related
Failed to save 'eclipse.ini': Unable to write file
'/Volumes/Eclipse 2/Eclipse.app/Contents/Eclipse/eclipse.ini' (Unknown (FileSystemError): Error: EROFS: read-only file system, open '/Volumes/Eclipse 2/Eclipse.app/Contents/Eclipse/eclipse.ini')
This what happened when I try to manipulate what in this ini file as suggested in similar problems.
Here is my error message of saving in visual studio code
-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.1200.v20200508-1552
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
I do not have permission for this file for some reason. Also my previous question someone suggests me that the problem is not installing java jdk but after I installed it, then launch java ee version, same error appears. How do I fix this?
I open the get Info of this ini file, it says dylan(writes/reads). I am confused.
Can someone tell me how to exactly install it.
Moreover, I look it up in java official guide of solving this problem, it says
If you’re seeing this popup when you launch Eclipse itself, or the Eclipse installer on your macOS, this post is for you. First, there’s a bit more details on the Eclipse and JDK bug trackers. To fix this, you will need to uninstall the problematic JDK version and install the latest one on your macOS machine:
Run the /usr/libexec/java_home -V command to list all installed JVM versions.
Identify the problematic version of the JVM – in my case it was “14, x86_64: "Java SE 14" /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home“.
Delete that version – with something like
“sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-14.jdk/“
Install the latest matching JVM / JDK – at the time of this writing it is 14.0.1
Verify that it appears in the list of installed JVMs with
/usr/libexec/java_home -V
If needed, point the Eclipse.app/Contents/Eclipse/eclipse.ini to the location of the newly installed JVM (-vm parameter)
I am not sure how it works. For example, how do I identify which one is problematic, and what command should I use in terminal to install it, etc.
I have the same problem and I updated eclipse.ini file as following:
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin
I added these lines to update -vm parameters right before -vmargs parameters and it works fine for me. Got from this website -> https://www.journaldev.com/10882/eclipse-ini-vm-arguments-file-location-mac-windows
We are setting up eclipse neon on Java 1.7 and it fails to start showing a popup with message
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Here is configuration in eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-1740
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.7
-Xms256m
-Xmx512m
I found this answer helpful. I was getting this error even after using java 8, So just delete eclipse.ini file, but backup first.
As of Eclipse Platform 4.6, and the Neon release, a Java 8 (or later) JRE or JDK is required to run Eclipse.
There is chance that the current eclipse you have was not completely downloaded. Try downloading again and try the set up again.
I received this error after upgrading from neon.2 to neon.3. Since Eclipse is ever-changing, what worked last year may not work today. My experience has shown the VM args to usually be the culprit in this situation, so my solution was to remove the -vmargs section of my eclipse.ini file and then restart Eclipse.
In my case it started correctly, so I added the VM args back one at a time until it failed. The source of my startup problems this time was -XX:+UseParallelGC. After some research I swapped it out for -XX:+UseG1GC and now I'm back in business.
Download and install JRE version 8, as it's required by Eclipse.
i just deleted the eclipse.ini then it worked like a charm
just add your jdk path on the top of your init file as below.
-vm
C:/Program Files/Java/jdk1.8.0_71/bin/javaw
Cannot start sts - it gives me below error - I am using Windows 8.1; JAVA Version 1.8.0_20 - not sure whats going wrong
-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.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vm
T:/softwares/jdk1.8.0_20/bin/javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Xms40m
-Xmx768m
-Dorg.eclipse.swt.browser.IEVersion=10001
I have tried changing JAVA_HOME path even added -vm args but nothing seems to work...Since I am running JAVA 1.8 I have added the required version as 1.8 not sure if that's the issue? Any help much appreciated. It gives me ERROR Code 13 constantly
I can't see the image that you mentioned, but I guess this is a mismatch between the STS version that you downloaded and the JDK that you are using with regards to 32bit vs. 64bit. It looks like you downloaded the 64bit version of STS. Are you sure that the JDK 1.8.0_20 that you have installed is a 64bit JDK as well? Error code 13 is often related to this kind of mismatch.
I downloaded the Eclipse IDE for Java Developers Linux 32 Bit file from here.
I extracted the file and launched eclipse from the command line.
Instead of Eclipse starting I get this message in a dialog box:
VM terminated. Exit code=13
/usr/bin/java
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx384m
-jar /home/justme/Desktop/FIREFOX_DOWNLOADS/eclipse/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
-os linux
-ws gtk
-arch x86
-showsplash
-launcher /home/justme/Desktop/FIREFOX_DOWNLOADS/eclipse/eclipse
-name Eclipse
--launcher.library /home/justme/Desktop/FIREFOX_DOWNLOADS/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.1.R36x_v20100810/eclipse_1309.so
-startup /home/justme/Desktop/FIREFOX_DOWNLOADS/eclipse/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
-exitdata 420021
-product org.eclipse.epp.package.java.product
-vm /usr/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx384m
-jar /home/justme/Desktop/FIREFOX_DOWNLOADS/eclipse/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
Any ideas how to fix this? I'm on Ubuntu 8.10 64bit and here's my Java info:
$ java -version
java version "1.6.0_0"
IcedTea6 1.3.1 (6b12-0ubuntu6.7) Runtime Environment (build 1.6.0_0-b12)
OpenJDK 64-Bit Server VM (build 1.6.0_0-b12, mixed mode)
First thing is to ensure you're running the java you think you're running. You can tell from your error output that it's using /usr/bin/java so run
/usr/bin/java -version
to check the version. That java is not necessarily the one on your path - you can find out which one that is with:
which java
Second thing you should probably try is the 64bit version of Eclipse. Everything else you have is 64bit.
Beyond that, I had all sorts of trouble early on with non-Sun JREs. That may not be the case now (or it may have been only specific to me) but it's something else you may want to look at.
On top of that (and probably unrelated to the problem at hand), do you really want to be running Eclipse from within your Firefox download directory. I would move it somewhere else personally.
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.