I'm trying to change eclipse.ini file to add -vm C:\Program Files\Java\jdk1.7.0\bin\javaw.exe
in order to get rid of the error:
java runtime environment JRE or java development kit must be available
in order to run eclipse. No java virtual machine was found after
searching in the folloiwng location
But the error still persists, am I doing something wrong?
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_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
-vm C:\Program Files\Java\jdk1.7.0\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
According to this Eclipse document:
Note the format of the -vm option - it is important to be exact:
The -vm option and its value (the path) must be on separate lines.
The value must be the full absolute or relative path to the Java executable, not just to the Java home directory.
The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM.
Note the first requirement. So, try using this somewhere in your .ini file:
-vm
C:\Program Files\Java\jdk1.7.0\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
Note: this is obviously a fragile way to enforce .ini file syntax, and I believe a later version of Eclipse has fixed this potential problem. But, looking at your file, you seem to have a May 2011 build, and if it's not working, I'd try following the .ini document strictly.
try use the same values for:
-Xms and -Xmx
example:
-Xms384m
-Xmx384m
this works for me
Related
I have eclipse can't start correctly, i have tried two ways:
set environment variables about java, and running and compiling in windows cmd is fine. i have no admin rights and system path have wrong java path but i can't change it. so the eclipse will crash.
use -vm option in eclipse.ini without java_home setting, have following error:
java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench" could not be found in the registry.
my eclipse.ini:
`-startup
plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.400.v20160518-1444
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vm
C:\software\java\jdk_1.7.0_89\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms256m
-Xmx1024m
`
Thanks everyone!
Eclipse Neon (and Eclipse Oxygen) both require Java 8 to run, you appear to be running Java 7. You will have to install Java 8 and specify its location in the eclipse.ini.
I was working on my Java Code without problems. Then I updated to Java 8 because of that I could not start Eclipse anymore. So I downgraded it again to Java 7. Now I can start Eclipse but if I try to start any Java project I get this:
Thread [main] (Ausgesetzt (Ausnahmebedingung UnsupportedClassVersionError))
Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line:not available
Launcher$AppClassLoader.loadClass(String,boolean) line: not available
Launcher$AppClassLoader(ClassLoader).loadClass(String) line: not available
LauncherHelper.checkAndLoadMain(boolean, int, String) line: not available
C:\Program Files\Java\jre7\bin\javaw.exe(10.06.2015 19:24:48)
Already searched on google for this problem. There were some solutions with Step-filtering but it does not help.
Hope someone could help me. (If there are some words you don't understand: thats german but don't worry they are not necessary)
Thanks
You can explicitly specify the -vm argument in eclipse.ini file as in below and restart eclipse
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20150204-1316
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:\Program Files\Java\jre7\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
If you still face the issue, try to open eclipse in new workspace and import your projects which are in old workspace folder into new workspace folder
Note: It is advisable to have jdk as value for -vm argument rather than jre
Update your java path to point to Java 7.
I recently updated java and came across this error... I've changed my eclipse.ini file to the
-vm
C:\Program Files (x86)\Java\jre7\bin\javaw.exe
Yet it still doesn't work... here is the whole ini file
-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.cpp.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-XX:-UseCompressedOops
-vm
C:\Program Files (x86)\Java\jre7\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms40m
-Xmx512m
Any solutions? I don't know what to do
Make sure the JAVA_HOME variable and path was set properly.
I added the below, which resolved this issue.
-vm
C:\Program Files\Java\jdk1.6.0_45\bin\javaw.exe
Make sure, that the -vm option occurs before the -vmargs command.
The error message points to a problem with your java Version. Do you have a JDK installed?
Try adding:
-vm
c:/wherever/java/jdk1.8.0_40/jre/bin/server/jvm.dll
to your eclipse.ini file, pointing to the JDK you want to use, and check that the required Java Verision is at least as new as your JDK. This is the path for a Windows system.
Discovered the issue thanks to #Goose.
My JDK version was somehow not working? A fresh installation of Java and JDK seemed to resolve the issue as well as the rerouting of the ini file to:
-vm
c:/wherever/java/jdk1.8.0_40/jre/bin/server/jvm.dll
i have removed the same path which is displaying in error message from system environmental variables [ In "Path" Variable]
I am trying to start eclipse after installing java 7 and adding the line
-vm
C:\Progra~2\Java\jdk1.7.0_45\bin\javaw.exe
to the eclipse.ini file. Still i am getting the error "Java was started but returned exit code=13".
I just want to know how to start eclipse. Even if i have to install eclipse, java, jre all over again.
Any suggestion will do!
My eclipse.ini file:
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_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
-vm
C:\Progra~2\Java\jdk1.7.0_45\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
On pasting the jre in eclipse folder i am getting this error:
All you have to do is to put the new jdk path in eclipse.ini
-vm
C:\Program Files\Java\jdk1.8.0_11\bin\javaw.exe
or the your new jdk path.
make sure that you type the above just before the -vmargs and after the OpenFile
that solved my problem
Check that you have installed the correct java that your OS requires. Meaning, if you are running a 64 bit OS then you need 64 bit java and the same for 32 bit.
Check eclipse.ini file, and in particular format of the vm option (look here for more):
Note the format of the -vm option - it is important to be exact:
The -vm option and its value (the path) must be on separate lines.
The value must be the full absolute or relative path to the Java executable, not just to the Java home directory.
The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM.
Another thing to check is that bit version (32/64) of JVM should match bit version of eclipse (32/64).
I have downloaded springsource tool. But on install, it is giving me error "failed to create java virtual machine". Can anyone suggest me some solution?
This is my sts.ini
-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
com.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
384M
-vm C:\Program Files\Java\jdk1.6.0\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xmn128m
-Xms256m
-Xmx768m
-Xss1m
-XX:PermSize=128m
-XX:MaxPermSize=384m
Find your sts.ini file usually in the root directory where you installed spring, try adding this as the first line in the file, make sure it points to YOUR JDK (You may need to change the path), also sometimes you need to put -vm and the path on different lines.
-vm C:\Program Files\Java\jdk1.6.0_20\bin\javaw.exe
My sts.ini
-vm
C:\Program Files\Java\jdk1.6.0_20\bin\javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1.R36x_v20100810
-product
com.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m
Today I had this problem with spring source tool and the resolution specified here worked better: Could not create the Java virtual machine
-Xmn128m
-Xms256m
-Xmx768m
-Xss1m
-XX:PermSize=128m
-XX:MaxPermSize=384m
Reduced/changed max heap size to be same as MaxPermSize, and STS started without issues.
-Xmx768m ---> -Xmx384m
Make sure your heap sizes are less than your RAM.
For anyone who may have a similar issue as myself, your path to javaw.exe may be different. My path turned out to be:
C:\Program Files (x86)\Common Files\Oracle\Java\javapath\javaw.exe
In the command line, run where java and use that path to javaw.exe
Combining these two lines worked for me also.
-vm
C:\Program Files\Java\jdk1.6.0_20\bin\javaw.exe
Today I had this problem with spring source tool and the resolution specified here worked better:
Reduced/changed max heap size to be same as MaxPermSize, and STS started without issues
-XX:PermSize=128m,
Xmx768m ---> -Xmx384m