Myeclipse突然崩溃问题解决方案

      Myeclipse突然崩溃问题解决方案:

   这两天项目刚开始有时间写,突然就出现了这个崩溃的问题,昨天出现了一次,没在意,只是认为可能有缓冲啥的,或者电脑卡的问题(太浅显了),现在看来是一个myeclipse的系统环境问题,于是百度之,做总结如下:

  当我们正在兴致勃勃的写代码时,编辑器,突然挂了是一件非常蛋疼的事情,今天是第二次,忘了截图作为纪念,不过首先第一句话记住了如下:

JVM terminated.Exit code=1

意思是说java 虚拟机挂了,而不是myeclipse挂了。刚开始百度说有myeclipse(就是myeclipse的安装目录)下有日志记录异常,于是找到异常:


<span style="color:#333333;">.log的文件就是异常日志,现在看来是出现了两个异常报告:
文件:hs_err_pid5048.log内容如下:
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006dc378d0, 
pid=5048, tid=5180
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (11.3-b02 mixed mode 
windows-amd64)
# Problematic frame:
# V  [jvm.dll+0x3a78d0]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

//这里我删掉了一些日志信息,线程(Thread)和进程(process),以及堆(heap)和栈(Stack)的一些信息,如果能读懂这些16进制代码和堆栈信息以及myeclipse的安装环境应该能探知个一二,无奈才疏学浅啊。以后再仔细探究,下面这些信息则记录了与崩溃问题有关的信息

//虚拟机的命令参数
VM Arguments:
jvm_args: -Xmx512m -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=64m -
Dosgi.nls.warnings=ignore 
java_command: C:\Users\fcs\AppData\Local\Temp\pul78A9.tmp\PULSEI~1.JAR -
os win32 -ws win32 -arch x86_64 -showsplash 
-launcher D:
\myeclipse10\installMyeclipse10\MyEclipse 10\myeclipse.exe -name 
Myeclipse 
--launcher.library D:\myeclipse10\installMyeclipse10\MyEclipse 
10\../Common/plugins/org.eclipse.equinox.launcher.i18n.win32.win32.x86_64
_4.2.0.v201201111650\eclipse_4201.dll 
-startup D:
\myeclipse10\installMyeclipse10\MyEclipse 
10\../Common/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar -
exitdata 1b50_5c 
</span><span style="color:#ff0000;">-install D:\myeclipse10\installMyeclipse10\MyEclipse 10 
-configuration D:\myeclipse10\installMyeclipse10\MyEclipse 
10\configuration 
-vm D:\myeclipse10\installMyeclipse10\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\bin\javaw.exe </span><span style="color:#333333;">
-vmargs -Xmx512m 
-XX:MaxPermSize=256m 
-XX:ReservedCodeCacheSize=64m -
Dosgi.nls.warnings=ignore 
-jar C:\Users\fcs\AppData\Local\Temp
\pul78A9.tmp\PULSEI~1.JAR
Launcher Type: SUN_STANDARD

环境变量
Environment Variables:
JAVA_HOME=D:\JDK1.07\jdk1.7for64
CLASSPATH=.;D:\JDK1.07\jdk1.7for64\lib\dt.jar;D:\JDK1.07\jdk1.7for64\lib
\tools.jar
PATH=.;D:\JDK1.07\jdk1.7for64\bin;D:\MongoDB\bin;D:\JDK1.7\bin;D:
\mysql5\bin;D:\JDK1.07\jdk1.7for64\bin;D:\JDK1.07\jdk1.7for64\jre\bin;D:
\android01\adt-bundle-windows-x86_64-20140321\sdk\tools;D:\mavenInfo
\apache-maven-3.2.2-bin\apache-maven-3.2.2\bin;D:\m2\repository;D:
\MongoDB\bin;
USERNAME=fcs
OS=Windows_NT
PROCESSOR_IDENTIFIER=AMD64 Family 20 Model 2 Stepping 0, AuthenticAMD



---------------  S Y S T E M  ---------------
//系统信息
OS: Windows NT 6.1 Build 7601 Service Pack 1

CPU:total 2 (2 cores per cpu, 1 threads per core) family 20 model 2 
stepping 0, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, mmxext, sse4a

Memory: 4k page, physical 3777912k(1361744k free), swap 7553960k(4429436k 
free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (11.3-b02) for windows-amd64 
JRE (1.6.0_13-b03), built on Mar  9 2009 10:50:19 by "java_re" with MS 
VC++ 8.0
time: Thu Oct 30 10:57:41 2014
elapsed time: 6638 seconds
</span>

看一下红字部分,信息说明myeclipsejdk是自带的,崩溃也是由其引发的,而我们在使用eclipse时,jdk已经安装好了,myeclipse本身的界面由于也是java写的,这部分也需要指定jdk路径,而这里默认的是myeclipse自带的,这个容易出问题也就是说当我们编辑代码的时候,其自带的jdk会时不时的罢工这里需要我们指定自己安装好的jdk:

修改的地方 就是myeclipse.ini

这是我的文件信息:

#utf8 (do not remove)

#utf8 (do not remove)

-startup

../Common/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar

--launcher.library

../Common/plugins/org.eclipse.equinox.launcher.i18n.win32.win32.x86_64_4.2.0.v201201111650

-install

D:\myeclipse10\installMyeclipse10\MyEclipse 10

-vm

D:\JDK1.07\jdk1.7for64\bin\javaw.exe

-configuration

D:\myeclipse10\installMyeclipse10\MyEclipse 10\configuration

-vmargs

-Xmx512m

-XX:MaxPermSize=256m

-XX:ReservedCodeCacheSize=64m

-Dosgi.nls.warnings=ignore


红色部分就是要修改的,这里我换成自己的jdk下的文件,

第二个日志信息与之类似,这里就不写了。

 

而对javaw.exe我也查了一下:

Javaw,不是系统进程,但是是后台程序,在后台执行,属于进程文件

对该文件的使用:

1java.exe:

运行java程序

2javac.exe:

编译的,生成.class文件

3javaw.exe

java命令相对的,运行java命令时,会出现并保持一个console窗口,

程序中的信息可以通过System.outconsole内输出,而运行javaw

开始时会出现console,当主程序调用之后,console就会消失;

javaw 大多用来运行GUI程序

 

另外可以在1. Eclipse——Window——Preferences——Java——Installed JREs下添加自己安装1.5+jdk路径 添加好后把旧版本的Remove(不删也行,默认只能选一个):

如下:



第二个就是myeclipse自带的jdk ,注意在点击add按钮添加jre的时候




点击Directory(添加JRE home的值),目录是jdk的安装目录,而不是jdk下的bin目录或者是lib目录,否则会提示找不到文件和环境。添加完之后,可以指定JRE name的值,默认是路径值,下面是设置vm的参数,根据机子的配置和项目大小适当配置即可。

 

另外引起myeclipse或者eclipse崩溃的问题可能是虚拟机内存不足,需要在myeclipse.ini或者eclipse.ini的配置文件里修改参数,或者,在myeclipse里的图形化界面中设置。

 

如果是初学者,或者是刚入门想了解一下关于jdk或者JRE方面的知识可以参考一下这篇文章:http://bbx16899.blog.163.com/blog/static/171468589201122932120684

 

在我们选择编辑器的时候,比如eclipsemyeclipse等版本的时候,一定要选择与自己机子上的jdk版本相适应的,或者稍微麻烦点,将jdk升级一下,现在应该是出到1.8了,不过做项目练习啥的,1.6,1.7的就够了。


已标记关键词 清除标记
相关推荐
myeclipse.ini配置: -vmargs -Xmx1600m -Xms1024m -XX:NewSize=128M -XX:MaxNewSize=384M -XX:SurvivorRatio=4 -XX:InitialTenuringThreshold=7 -XX:MaxPermSize=384m -XX:PermSize=384m -XX:LargePageSizeInBytes=4m -XX:ReservedCodeCacheSize=80m -XX:-UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:CMSMaxAbortablePrecleanTime=1000 -XX:+CMSClassUnloadingEnabled -XX:LargePageSizeInBytes=128M -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:ParallelGCThreads=2 -XX:MaxGCPauseMillis=100 -verbose:gc -Xloggc:d:\megc.log -XX:+PrintTenuringDistribution -XX:+PrintCMSInitiationStatistics -XX:+PrintHeapAtGC -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+PrintAdaptiveSizePolicy -Dosgi.nls.warnings=ignore d:\megc.log日志: {Heap before GC invocations=108 (full 0): par new generation total 327680K, used 262144K [0x000000007fff0000, 0x0000000097ff0000, 0x0000000097ff0000) eden space 262144K, 100% used [0x000000007fff0000, 0x000000008fff0000, 0x000000008fff0000) from space 65536K, 0% used [0x000000008fff0000, 0x000000008fff0000, 0x0000000093ff0000) to space 65536K, 0% used [0x0000000093ff0000, 0x0000000093ff0000, 0x0000000097ff0000) tenured generation total 928056K, used 556831K [0x0000000097ff0000, 0x00000000d0a3e000, 0x00000000e3ff0000) the space 928056K, 59% used [0x0000000097ff0000, 0x00000000b9fb7dd0, 0x00000000b9fb7e00, 0x00000000d0a3e000) compacting perm gen total 393216K, used 153255K [0x00000000e3ff0000, 0x00000000fbff0000, 0x00000000fbff0000) the space 393216K, 38% used [0x00000000e3ff0000, 0x00000000ed599ff0, 0x00000000ed59a000, 0x00000000fbff0000) No shared spaces configured. 349.200: [GC 349.200: [ParNew Desired survivor size 33554432 bytes, new threshold 1 (max 15) - age 1: 67108712 bytes, 67108712 total : 262144K->65536K(327680K), 0.0677016 secs] 818975K->628137K(1255736K), 0.0677586 secs] [Times: user=0.16 sys=0.00, real=0.07 secs] Heap after GC invocations=109 (full 0): par new generation total 327680K, used 65536K [0x000000007fff0000, 0x0000000097ff0000, 0x0000000097ff0000) eden space 262144K, 0% used [0x000000007fff0000, 0x000000007fff0000, 0x000000008fff0000) from space 65536K, 100% used [0x0000000093ff0000, 0x0000000097ff0000, 0x0000000097ff0000) to space 65536K, 0% used [0x000000008fff0000, 0x000000008fff0000, 0x0000000093ff0000) tenured generation total 928056K, used 562601K [0x0000000097ff0000, 0x00000000d0a3e000, 0x00000000e3ff0000) the space 928056K, 60% used [0x0000000097ff0000, 0x00000000ba55a430, 0x00000000ba55a600, 0x00000000d0a3e000) compacting perm gen total 393216K, used 153255K [0x00000000e3ff0000, 0x00000000fbff0000, 0x00000000fbff0000) the space 393216K, 38% used [0x00000000e3ff0000, 0x00000000ed599ff0, 0x00000000ed59a000, 0x00000000fbff0000) No shared spaces configured. } {Heap before GC invocations=109 (full 0): par new generation total 327680K, used 327680K [0x000000007fff0000, 0x0000000097ff0000, 0x0000000097ff0000) eden space 262144K, 100% used [0x000000007fff0000, 0x000000008fff0000, 0x000000008fff0000) from space 65536K, 100% used [0x0000000093ff0000, 0x0000000097ff0000, 0x0000000097ff0000) to space 65536K, 0% used [0x000000008fff0000, 0x000000008fff0000, 0x0000000093ff0000) tenured generation total 928056K, used 562601K [0x0000000097ff0000, 0x00000000d0a3e000, 0x00000000e3ff0000) the space 928056K, 60% used [0x0000000097ff0000, 0x00000000ba55a430, 0x00000000ba55a600, 0x00000000d0a3e000) compacting perm gen total 393216K, used 153325K [0x00000000e3ff0000, 0x00000000fbff0000, 0x00000000fbff0000) the space 393216K, 38% used [0x00000000e3ff0000, 0x00000000ed5ab478, 0x00000000ed5ab600, 0x00000000fbff0000) No shared spaces configured. 640.638: [GC 640.638: [ParNew Desired survivor size 33554432 bytes, new threshold 15 (max 15) - age 1: 1538544 bytes, 1538544 total : 327680K->63420K(327680K), 0.0718015 secs] 890281K->692035K(1255736K), 0.0718668 secs]
©️2020 CSDN 皮肤主题: 博客之星2020 设计师:CY__ 返回首页