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

9
  • Try to minimize max heap space... Commented Mar 31, 2015 at 7:48
  • how exactly would i do that? Sorry I'm a c++ beginner have only been coding for a few weeks Commented Mar 31, 2015 at 7:49
  • if you have already installed jdk 1.7 then try to change -Xms40m -Xmx512m to -Xms40m -Xmx128min your eclipse.ini file. Commented Mar 31, 2015 at 7:54
  • I had similar problems a while back. It turned out my Java installation was knackered. Can you run java -version from the command prompt? If not try uninstalling and reinstalling Java. The latest JDK is 8u40. Commented Mar 31, 2015 at 7:56
  • @Goose I got this "Error occured during intialization of VM java/lang/NoClassDefFoundError: java/lang/object Commented Mar 31, 2015 at 8:05

4 Answers 4

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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.

4 Comments

These are the versions I currently have: gyazo.com/d7be3ace9460d4fe8d2e2a3425110deb
@lovestogame227 As per your JDK version, I updated the solution. Check it
I did that and end up with this: gyazo.com/63a81c01f677a3384469896a0d918ae4 however I end up now with A java runtime environment (JRE) or JDK must be available in order to run eclipse
'-vm' and the path must always be on separate lines in the eclipse.ini
1

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

1 Comment

A re-install of the JDK is all that was needed to resolve my (same) issue. No need to hard link any jdk in the ini file, in fact I would recommend against the -vm option as it will cause problems on your next JVM/JDK update (if you're like me, you'll forgot you added that line).
0

i have removed the same path which is displaying in error message from system environmental variables [ In "Path" Variable]

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.