Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

ide-java can't resolve system libraries #101

Open

Description

@misabiko

I receive the error "The type [type] cannot be resolved. It is indirectly referenced from required .class files." for java.lang.Object, java.lang.String and any other imports that's not from my project.

I'm on Windows 10, I have both Java 11 and 8 installed and JAVA_HOME is set to Java/jdk-11.0.2
The JDT server launches without issues. I've tried with both Linter and Diagnostics, but result is the same.
I also tried using vscode-java and I can launch the project no problem, same in command line.

Here's my .classpath file, it points to Java 1.8, but I can still compile on vscode, and I don't know the notation for Java 11.

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
	<classpathentry kind="output" path="bin"/>
</classpath>

Activity

  1. albanm commented on Apr 9, 2019

    @albanm

    Same problem here. On ubuntu, in ide-java's settings the java home is set to "/usr/lib/jvm/java-8-openjdk-amd64" and I receive warnings like "The type java.lang.Object cannot be received".

    Did you find a solution ?

  2. imaspeer commented on Apr 17, 2019

    @imaspeer

    Use org.eclipse.jdt.launching.JRE_CONTAINER instead.

  3. leoggoes commented on May 1, 2019

    @leoggoes

    Use org.eclipse.jdt.launching.JRE_CONTAINER instead.

    That worked for me. Removed everything after JRE_CONTAINER on the classpathentry

  4. denis111 commented on May 21, 2019

    @denis111

    I have this on clean gradle project and JDK11:

    Could not determine java version from '11.0.3'.
    java.lang.IllegalArgumentException: Could not determine java version from '11.0.3'.
    	at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:72)
    	at org.gradle.api.JavaVersion.current(JavaVersion.java:82)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions