Could not Create the Java Virtual Machine or Unhandled Event Loop Exception

来源:互联网 发布:安卓开发java基础 编辑:程序博客网 时间:2024/06/07 20:10

本来配置maven环境,自己的eclipse版本比较老,打开windows-preference-maven下的功能比同学的少,就从室友那儿copy了新版的eclipse,打开几次后,随便点击编辑页面就报错:Unhandled event loop exception.Item not added.

以为是eclipse版本问题,后来又copy了一份更新的eclipse,直接打不开,报错:error:could not create the java virtual machine. error a fatal exception has occurred. program will exit。 百度后,原来是jvm的内存不够,虽然我没碰过,反正就是jdk的问题,查到好几个方法,一一试过,只有一种适合我~

一、修改eclipse.ini文件

试过,我的并不行

二、配置环境变量

上述方法只是针对eclipse改变了jvm的内存,这个方法针对整个系统,

新增环境变量:_JAVA_OPTIONS

                   值:-Xmx512M

试了,我的还是不行!!

三、删除文件

安装JDK的时候在C:\Windows\System32生成的java.exe、javaw.exe、javaws.exe

这个3个引起的;只要把这3个运行文件删除掉就可以了


追加:

又出问题了,,

上面的方法并没用

查看日志,错误为:Warning: The environment variable HOME is not set. The following directory will be used for storing the Git user

最后解决方法:(Add the environment variable HOME to your environment variables.)

  1. In Windows 7, type "environment" at the start menu.
  2. Select "Edit environment variables for your account".
  3. Click the "New" button.
  4. Enter "HOME" in the name field.
  5. Enter "%USERPROFILE%" or some other path in the value field.
  6. Click OK, and OK again. You have just added the Home directory on Windows.

0 0
原创粉丝点击