DBMNG数据库管理与应用

抓住自己最有兴趣的东西,由浅入深,循序渐进地学……
当前位置:首页 > 经验分享 > Java开发

failedtocreatethejavavirtualmachine-Eclipse启动是报错的解决方法

重新安装了系统,重新安装了jdk,重新安装了javaEE版的eclipse准备Android的应用开发,结果打开eclipse时报了个错,如图:


google了一下,解决的办法如下:

找到eclipse目录下的eclipse.ini,可以看到如下内容:
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-product
org.eclipse.epp.package.jee.product
–launcher.defaultAction
openFile
–launcher.XXMaxPermSize
256M 
-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
256m
–launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

将改成如下并保存,再打开eclipse就可以正常运转了:

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-product
org.eclipse.epp.package.jee.product
–launcher.defaultAction
openFile
–launcher.XXMaxPermSize
128M
-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
128m
–launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

说明:PermSize和MaxPermSize指明虚拟机为java永久生成对象(Permanate generation)等这些可反射(reflective)对象分配内存限制,这些内存不包括在Heap(堆内存)区之中。

-Xms128m 
表示JVM Heap(堆内存)最小尺寸128MB,初始分配
-Xmx512m 
表示JVM Heap(堆内存)最大允许的尺寸256MB,按需分配。

-XX:PermSize=64MB 最小尺寸,初始分配
-XX:MaxPermSize=256MB 最大允许分配尺寸,按需分配
过小会导致:java.lang.OutOfMemoryError: PermGen space


本站文章内容,部分来自于互联网,若侵犯了您的权益,请致邮件chuanghui423#sohu.com(请将#换为@)联系,我们会尽快核实后删除。
Copyright © 2006-2023 DBMNG.COM All Rights Reserved. Powered by DEVSOARTECH            豫ICP备11002312号-2

豫公网安备 41010502002439号