java - 当我访问特定类时 Eclipse 不断崩溃

标签 java eclipse

我的 Eclipse 有一个问题:当我访问某些类时,它不断崩溃且没有错误消息。我只是打开一个类文件,向下滚动一点或输入最多一行,Eclipse 就会无缘无故地崩溃。有没有人有解决办法?

这是我的配置文件:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20150204-1316
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms256m
-Xmx1024m

日志:

!SESSION 2016-08-13 15:56:27.837 -----------------------------------------------
eclipse.buildId=4.4.2.M20150204-1700
java.version=1.8.0_92
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

This is a continuation of log file C:\Users\Andrew\workspace\.metadata\.bak_0.log
Created Time: 2016-08-13 15:56:29.116
!SESSION 2016-08-13 15:56:27.837 -----------------------------------------------
eclipse.buildId=4.4.2.M20150204-1700
java.version=1.8.0_92
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

!ENTRY org.eclipse.core.resources 2 10035 2016-08-13 15:56:29.119
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.egit.ui 2 0 2016-08-13 15:56:36.126
!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
this system level configuration. The Git installation location can be configured on the
Team > Git > Configuration preference page's 'System Settings' tab.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

!ENTRY org.eclipse.egit.ui 2 0 2016-08-13 15:56:36.239
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\Andrew'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
!SESSION 2016-08-13 15:57:24.177 -----------------------------------------------
eclipse.buildId=4.4.2.M20150204-1700
java.version=1.8.0_92
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

!ENTRY org.eclipse.core.resources 2 10035 2016-08-13 15:57:25.530
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.egit.ui 2 0 2016-08-13 15:57:32.998
!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
this system level configuration. The Git installation location can be configured on the
Team > Git > Configuration preference page's 'System Settings' tab.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

最佳答案

我也遇到了同样的问题。

我通过在“帮助”->“检查更新”下执行 Eclipse 更新解决了这个问题。 作为 JRE 在 java 1.8.0_92 上运行。

我的 eclipse.ini:

-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-1740
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx4096m

如果这不能解决您的问题,请检查您使用哪个编辑器打开文件:右键单击文件 ->“打开方式”,您将看到标准编辑器。问题应该是编辑器的问题。当然,您可以尝试使用其他编辑器打开,如果 Eclipse 仍然崩溃,则不是编辑器问题...

关于java - 当我访问特定类时 Eclipse 不断崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38933864/

相关文章:

Eclipse e4 : add commands to context menu

eclipse - 我可以与其他人同时在同一个项目上使用 Java 进行编程吗?

Java SWT 图像调整大小不起作用

初始化时出现 java.lang.NoSuchMethodError 错误。 session 工厂

eclipse - eclipse 的 Red5 插件?

php - 您能否禁止单个无法解析/编译的 php 文件在 Eclipse 中显示为错误?

java - 找出与自定义评分脚本中的术语匹配的字段

java - 在 Android 中将 WifiManager 重铸为对象时遇到问题

java - 运行 OSGI 框架时出现 bundle 异常

Ubuntu 中 Eclipse/SWT 中的 Java XULRunner 错误