Eclipse 2019-09 - Getting the error: "Could not determine Java version", while creating a new project

1.1k views Asked by At

I've downloaded the latest version of Eclipse eclipse-jee-2019-09-R-win32-x86_64.zip from the Eclipse Download location. Extracted it and created a new project.

I've got the below errors in eclipse:

Pop-up with the error "Could not update Project test configuration"

Eclipse Error Logs as displayed in Eclipse

Environment Variables:

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;

The contents of the .log file below:

!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)

I have tried this few times, extracting to different locations and with different workspaces, but I'm facing the same error.

I'm blocked with my development. Any help is appreciated.

1

There are 1 answers

0
Parthiban On

Make sure your files under JDK are accessible. I had same issue because my eclipse was not able to access my JDK files because of proxy issue. Then i changed my JDK path. It worked.