3

So like the title says, Im having an issue with eclipse JVM launcher. Last night, everything was working fine, as far as I know, nothing at all has changed on my pc since then. However, I woke up this morning to find that when I run any of my projects in eclipse I recive this error: Java Virtual Machine Launcher- Error: could not open C:\Program Files\Java\jre1.8.0_60\lib\amd6jvm.cfg

I have already verified the integrity of my Path variable, (C:\Program Files\Java\jdk1.8.0_65\bin) Now at this point, you may notice, my jdk is on version 65. So is my JRE and java installation. I dont understand why eclipse is using jre 60. I also checked the preferences and changed the jre version too 65. No luck. Furthermore, I ran a simple java file without using eclipse through the command line and that ran/compiled just fine. I tried adding the -vm tag (It didn't already exist there) to eclipse.ini and setting it too the jvm but it didn't help. (I than removed it) I have no idea what to do... Please help, I've tried everything I know how to do. Thanks!

EDIT:

My eclipse.ini file below:

-startup
../../../.p2/pool/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
../../../.p2/pool/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-install
C:/Users/Sanjiv/eclipse/java-mars/eclipse
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms256m
-Xmx1024m
-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/

EDIT 2 I have already tried reinstalling java, eclipse and jdk.

Ashwin Gupta
  • 2,159
  • 9
  • 30
  • 60
  • in cmdline java -vesion what version showing? you can also see the eclipse.ini file for java version specified... if not specified any you can do C:\Java\JDK\1.8\bin\javaw.exe -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx1024m – JAVAC Oct 24 '15 at 23:20
  • @JAVAC the cmdline shows the version for SE Runtime and java as 1.8.0_65. Let me check out that eclipse thing. I don't see any specified versions. This is all I could find that may be of use: `-vmargs -Dosgi.requiredJavaVersion=1.7`. Added my eclipse.ini file to question body. – Ashwin Gupta Oct 24 '15 at 23:21
  • for changes eclipse.ini you refer here http://wiki.eclipse.org/Eclipse.ini.. have you upgraded the java is that what caused? – JAVAC Oct 24 '15 at 23:26
  • @JAVAC possibly, it may have auto-updated? Do you happen to know when update 65 was released? Also, if this is the case how do I fix it? – Ashwin Gupta Oct 24 '15 at 23:27
  • yes it was 4 days back.. please refer this thread discussed similar issue what u had http://stackoverflow.com/questions/6452203/unable-to-start-eclipse-cant-open-java-jre6-lib-i386-jvm-cfg – JAVAC Oct 24 '15 at 23:29

2 Answers2

5

For windows user, if your getting this error:

Java Virtual Machine Launcher- Error: could not open C:\Program Files\Java\jre1.8.0_60\lib\amd6jvm.cfg

it indicates there is no jre1.8.0_60 version in your system. So you need to set the JRE version which is already there in our system by executing the below command:

  1. Go to cmd prompt
  2. go to the eclipse folder (which you have installed) by executing: cd eclipse-folder-path
  3. execute below command: eclipse -vm jre_path
    ex:

    eclipse -vm "C:\Program Files\Java\jdk1.8.0_131\jre\bin\javaw" 
    
Ivar
  • 6,138
  • 12
  • 49
  • 61
Deepika
  • 51
  • 1
  • 3
  • Welcome to SO. Your answer makes sense, this is probably functionally the same as what I found also. In summary (to any future observers), you must change the JRE version being used. – Ashwin Gupta Nov 09 '17 at 07:09
1

Ok, so after a bit of digging, I managed to fix the problem. In eclipse, I went to Windows>Preferences>Java>Installed JREs>Execution Enviorments>JavaSE-1.8>Compatible JREs>jre1.8.0_65(perfect match). I have no idea why or how that changed, (or why it worked) but hey, I'm not complaining. For anyone else with the same issue, first do everything I said in the question body, then try this. It hopefully will work for you too.

EDIT: I just figured out the cause of the issue as well. I opened the workspace on another computer (my workspace is on a shared drive) running java 1.8.0_60 while this computer is running java 1.8.0_65. Obviously, eclipse had to change the version therefore causing problems.

Ashwin Gupta
  • 2,159
  • 9
  • 30
  • 60