2

我已经从 Eclipse 下载位置下载了最新版本的 Eclipse eclipse-jee-2019-09-R-win32-x86_64.zip 。提取它并创建一个新项目。

我在eclipse中有以下错误:

弹出错误

Eclipse 中显示的 Eclipse 错误日志

环境变量:

C:\Users\User>java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)

C:\Users\User>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_202

C:\Users\User>echo %JRE_HOME%
C:\Program Files\Java\jdk1.8.0_202\jre

C:\Users\User>echo %PATH%
.....;C:\Program Files\Java\jdk1.8.0_202\bin;

.log 文件的内容如下:

!SESSION 2019-10-12 12:30:46.034 -----------------------------------------------
eclipse.buildId=4.13.0.I20190916-1045
java.version=1.8.0_202
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.egit.ui 2 0 2019-10-12 12:34:07.716
!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\Buddha'. 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.

!ENTRY org.eclipse.jdt.launching 4 4 2019-10-12 12:34:36.044
!MESSAGE Failed to retrieve default libraries for C:\Program Files\Java\jdk1.8.0_202

!ENTRY org.eclipse.jdt.launching 4 4 2019-10-12 12:34:38.998
!MESSAGE Failed to retrieve default libraries for C:\Program Files\Java\jdk1.8.0_202

!ENTRY org.eclipse.jdt.launching 4 4 2019-10-12 12:34:40.351
!MESSAGE Could not determine Java version for location C:\Program Files\Java\jdk1.8.0_202.

!ENTRY org.eclipse.jdt.launching 4 4 2019-10-12 12:34:40.353
!MESSAGE Could not determine Java version for location C:\Program Files\Java\jdk1.8.0_202.

!ENTRY org.eclipse.jdt.launching 4 4 2019-10-12 12:35:34.845
!MESSAGE Could not determine Java version for location C:\Program Files\Java\jdk1.8.0_202.

!ENTRY org.eclipse.jdt.launching 4 4 2019-10-12 12:35:34.866
!MESSAGE Could not determine Java version for location C:\Program Files\Java\jdk1.8.0_202.

!ENTRY org.eclipse.jdt.launching 4 4 2019-10-12 12:35:34.871
!MESSAGE Could not determine Java version for location C:\Program Files\Java\jdk1.8.0_202.

!ENTRY org.eclipse.m2e.logback.appender 2 0 2019-10-12 12:35:34.884
!MESSAGE Could not update project test configuration
!STACK 0
org.eclipse.core.runtime.AssertionFailedException: null argument:
    at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:88)
    at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:76)
    at org.eclipse.jdt.internal.launching.ClasspathShortener.<init>(ClasspathShortener.java:94)
    at org.eclipse.jdt.internal.launching.ClasspathShortener.<init>(ClasspathShortener.java:89)
    at org.eclipse.jdt.internal.launching.StandardVMRunner.getCommandLine(StandardVMRunner.java:473)
    at org.eclipse.jdt.internal.launching.StandardVMRunner.run(StandardVMRunner.java:497)
    at org.eclipse.jdt.launching.AbstractVMInstall.evaluateSystemProperties(AbstractVMInstall.java:398)
    at org.eclipse.jdt.internal.launching.environments.ExecutionEnvironmentAnalyzer.isFoundation1_0(ExecutionEnvironmentAnalyzer.java:183)
    at org.eclipse.jdt.internal.launching.environments.ExecutionEnvironmentAnalyzer.analyze(ExecutionEnvironmentAnalyzer.java:111)
    at org.eclipse.jdt.internal.launching.environments.Analyzer.analyze(Analyzer.java:44)
    at org.eclipse.jdt.internal.launching.environments.EnvironmentsManager.analyze(EnvironmentsManager.java:387)
    at org.eclipse.jdt.internal.launching.environments.EnvironmentsManager.initializeCompatibilities(EnvironmentsManager.java:294)
    at org.eclipse.jdt.internal.launching.environments.ExecutionEnvironment.init(ExecutionEnvironment.java:185)
    at org.eclipse.jdt.internal.launching.environments.ExecutionEnvironment.getDefaultVM(ExecutionEnvironment.java:227)
    at org.eclipse.jdt.internal.launching.JREContainerInitializer.resolveVM(JREContainerInitializer.java:179)
    at org.eclipse.jdt.internal.launching.JREContainerInitializer.resolveVM(JREContainerInitializer.java:146)
    at org.eclipse.jdt.internal.launching.JREContainerInitializer.initialize(JREContainerInitializer.java:63)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:3195)
    at org.eclipse.jdt.internal.core.JavaModelManager$10.run(JavaModelManager.java:3079)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2295)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2322)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:3141)
    at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:2111)
    at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3691)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3142)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3065)
    at org.eclipse.jdt.internal.core.ClasspathEntry.validateClasspath(ClasspathEntry.java:1863)
    at org.eclipse.jdt.internal.core.SetClasspathOperation.verify(SetClasspathOperation.java:125)
    at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:796)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3554)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3514)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3527)
    at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.configure(AbstractJavaProjectConfigurator.java:176)
    at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:120)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:508)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:1)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:501)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.configureNewMavenProjects(ProjectConfigurationManager.java:288)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$1.call(ProjectConfigurationManager.java:175)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$1.call(ProjectConfigurationManager.java:1)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1374)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.importProjects(ProjectConfigurationManager.java:143)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.createArchetypeProjects0(ProjectConfigurationManager.java:863)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$5.call(ProjectConfigurationManager.java:792)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$5.call(ProjectConfigurationManager.java:1)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1374)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.createArchetypeProjects(ProjectConfigurationManager.java:790)
    at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizard$5.doCreateMavenProjects(MavenProjectWizard.java:241)
    at org.eclipse.m2e.core.ui.internal.wizards.AbstractCreateMavenProjectJob$1.doCreateMavenProjects(AbstractCreateMavenProjectJob.java:63)
    at org.eclipse.m2e.core.ui.internal.wizards.AbstractCreateMavenProjectsOperation.run(AbstractCreateMavenProjectsOperation.java:73)
    at org.eclipse.m2e.core.ui.internal.wizards.AbstractCreateMavenProjectJob.runInWorkspace(AbstractCreateMavenProjectJob.java:67)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY org.eclipse.m2e.core 4 0 2019-10-12 12:35:34.905
!MESSAGE Could not update project test configuration
!STACK 0
org.eclipse.core.runtime.AssertionFailedException: null argument:
    at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:88)
    at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:76)
    at org.eclipse.jdt.internal.launching.ClasspathShortener.<init>(ClasspathShortener.java:94)
    at org.eclipse.jdt.internal.launching.ClasspathShortener.<init>(ClasspathShortener.java:89)
    at org.eclipse.jdt.internal.launching.StandardVMRunner.getCommandLine(StandardVMRunner.java:473)
    at org.eclipse.jdt.internal.launching.StandardVMRunner.run(StandardVMRunner.java:497)
    at org.eclipse.jdt.launching.AbstractVMInstall.evaluateSystemProperties(AbstractVMInstall.java:398)
    at org.eclipse.jdt.internal.launching.environments.ExecutionEnvironmentAnalyzer.isFoundation1_0(ExecutionEnvironmentAnalyzer.java:183)
    at org.eclipse.jdt.internal.launching.environments.ExecutionEnvironmentAnalyzer.analyze(ExecutionEnvironmentAnalyzer.java:111)
    at org.eclipse.jdt.internal.launching.environments.Analyzer.analyze(Analyzer.java:44)
    at org.eclipse.jdt.internal.launching.environments.EnvironmentsManager.analyze(EnvironmentsManager.java:387)
    at org.eclipse.jdt.internal.launching.environments.EnvironmentsManager.initializeCompatibilities(EnvironmentsManager.java:294)
    at org.eclipse.jdt.internal.launching.environments.ExecutionEnvironment.init(ExecutionEnvironment.java:185)
    at org.eclipse.jdt.internal.launching.environments.ExecutionEnvironment.getDefaultVM(ExecutionEnvironment.java:227)
    at org.eclipse.jdt.internal.launching.JREContainerInitializer.resolveVM(JREContainerInitializer.java:179)
    at org.eclipse.jdt.internal.launching.JREContainerInitializer.resolveVM(JREContainerInitializer.java:146)
    at org.eclipse.jdt.internal.launching.JREContainerInitializer.initialize(JREContainerInitializer.java:63)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:3195)
    at org.eclipse.jdt.internal.core.JavaModelManager$10.run(JavaModelManager.java:3079)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2295)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2322)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:3141)
    at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:2111)
    at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3691)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3142)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3065)
    at org.eclipse.jdt.internal.core.ClasspathEntry.validateClasspath(ClasspathEntry.java:1863)
    at org.eclipse.jdt.internal.core.SetClasspathOperation.verify(SetClasspathOperation.java:125)
    at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:796)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3554)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3514)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3527)
    at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.configure(AbstractJavaProjectConfigurator.java:176)
    at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:120)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:508)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:1)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:501)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.configureNewMavenProjects(ProjectConfigurationManager.java:288)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$1.call(ProjectConfigurationManager.java:175)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$1.call(ProjectConfigurationManager.java:1)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1374)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.importProjects(ProjectConfigurationManager.java:143)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.createArchetypeProjects0(ProjectConfigurationManager.java:863)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$5.call(ProjectConfigurationManager.java:792)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$5.call(ProjectConfigurationManager.java:1)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1374)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.createArchetypeProjects(ProjectConfigurationManager.java:790)
    at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizard$5.doCreateMavenProjects(MavenProjectWizard.java:241)
    at org.eclipse.m2e.core.ui.internal.wizards.AbstractCreateMavenProjectJob$1.doCreateMavenProjects(AbstractCreateMavenProjectJob.java:63)
    at org.eclipse.m2e.core.ui.internal.wizards.AbstractCreateMavenProjectsOperation.run(AbstractCreateMavenProjectsOperation.java:73)
    at org.eclipse.m2e.core.ui.internal.wizards.AbstractCreateMavenProjectJob.runInWorkspace(AbstractCreateMavenProjectJob.java:67)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

我已经尝试了几次,提取到不同的位置和不同的工作区,但我面临同样的错误。

我的发展受阻。任何帮助表示赞赏。

4

1 回答 1

0

确保 JDK 下的文件是可访问的。我遇到了同样的问题,因为我的 Eclipse 由于代理问题而无法访问我的 JDK 文件。然后我改变了我的JDK路径。有效。

于 2020-03-16T08:46:12.473 回答