eclipse.ini -vm has conflict with environment variables - java

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.

Related

Eclipse/Java can't start any project

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.

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]

Google app engine deployment : JDK not JRE

I have the
java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
While deploying my application on google app engine, I have searched for solutions and found that i should add:
-vm C:\Program Files\Java\jdk1.7.0_02\bin\javaw.exe
to eclipse.ini file to force eclipse to use JDK not JRE, I have confirmed from
windows >> prefrences >> java >>> installed JRE that it points to the JDK not the JRE ...
I tried uninstalling the whole jdk and installing it again ...
and I still have the problem ....
eclipse.ini file is:
-vm C:\Program Files\Java\jdk1.7.0_02\bin\javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20140116-2212
-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
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
and from Help >> About Eclipse >>>Installation details >>>configuration:
I have this:
-startup
F:\programs\some\eclipse-jee-kepler-SR2-win32\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.appendVmargs
-vm C:\Program Files\Java\jdk1.7.0_02\bin\javaw.exe
-product
org.eclipse.epp.package.jee.product
-vm
C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll
eclipse.home.location=file:/F:/programs/some/eclipse-jee-kepler-SR2-win32/eclipse/
eclipse.launcher=F:\programs\some\eclipse-jee-kepler-SR2-win32\eclipse\eclipse.exe
eclipse.launcher.name=Eclipse
eclipse.p2.data.area=#config.dir/../p2/
JAVA_HOME variable value: C:\Program Files\Java\jdk1.7.0_02\bin
In eclipse.ini write this (note : you have to add new line after -vm)
-vm
C:\Program Files\Java\jdk1.7.0_02\bin
I tried this and worked. First of all I am using GAE 1.9.2 and Eclipse Luna.
Luna too need jdk 1.7.
From command prompt mention JAVA_HOME and path. Use normal JAVA_HOME and PATH command to jdk version.
There after from console run eclipse. In eclipse set preferred JDK in preferences to jdk 1.7
And it will work.

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