Skip to content

Multirelease support: imports in editor cannot be resolved #4399

@tomaswolf

Description

@tomaswolf

Thanks for providing multirelease support in JDT. (m2e should also get updates...) The new feature works for compiling, but in an open Java editor, references to imports or classes from java.lang cannot be resolved.

Eclipse version:

Version: 2025-09 (4.37.0)
Build id: 20250905-1456

org.eclipse.jdt.core 3.43.0.v20250820-1501
org.eclipse.jdt.ui 3.35.100.v20250905-1111
org.eclipse.m2e.jdt 2.4.101.20250727-0653

To reproduce:

  1. Import the "mrproject" maven project from mrproject.zip into the workspace.
  2. Reset the project's default compliance to 1.8 (Package explorer context menu→Properties→Java Compiler; uncheck "Use compliance from execution environment" and set "Compiler compliance level" to 1.8, then apply.) Importing the maven project unfortunately resets that to 15.
  3. Now the project should show no errors in the package explorer.
  4. Open src/main/java15/com/example/MultiReleaseClass.java.
  5. The editor cannot resolve java.lang.System:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions