error in java launcher,如何修复Eclipse Java Virtual Machine Launcher错误?

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.

解决方案

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值