Eclipse/Java can't start any project - java

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.

Related

eclipse.ini -vm has conflict with environment variables

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.

Java was started but returned exit code=1?

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]

Eclipse Luna + ADT -freeze 99% when running app on mac

I was using Eclipse Luna + ADT, everything was fine, but today, when I try to run my project in my cel, it freezes to 99%, and then says:
Unable to execute dex: GC overhead limit exceeded
and then :
Unhandled loop expected
The only solution I find is go back to ADT Bundle ( w/ Kepler), but I don't love this solution as Eclipse is very outdate...
Any help will be appreciated
This Link Helped me a lot.
As what is said in the link above, you should increase the size of memory used by eclipse.
Just open the eclipse.ini file, located in the same folder as eclipse.exe is located by a text editor.
The original eclipse.ini file looks like this:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140116-2212
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
Now change the last 2 lines to:
-Xms512m
-Xmx1024m
You can also increase the value of MaxPermSize, as the following:
-XX:MaxPermSize=1024m
This solution helped me and solve my problem.
Good luck

On starting eclipse, it gives an error "Java was started but returned exit code=13"

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).

Can't make eclipse open even after change eclipse.ini

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

Categories