Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-3390

Presence of java.lang.Module causes build path errors in Eclipse

    XMLWordPrintableJSON

Details

    Description

      To reproduce:

      • Create a Java project in Eclipse 2019-09 (and probably also 2019-06)
      • Add a dependency on org.netbeans.modules:org-netbeans-bootstrap
      • Build the project in Eclipse

      You'll see the following in the problems window:

      The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project

      In the Eclipse log file, there are many errors similar to the following:

      MESSAGE Compile error during code evaluation: The package java.lang is accessible from more than one module: <unnamed>, java.base

      This appears to be due to the addition of java.lang.Module in o.n.bootstrap as part of JDK 9 instrumentation support.

      Removing this file and building/running with JDK 11 resolves the issue.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rkeen Rangi Keen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: