Eclipse is confused by imports (“accessible from more than one module”)

前端 未结 6 1733
予麋鹿
予麋鹿 2020-11-29 08:48

When referencing simple .jar files, Eclipse shows an error stating:

The package java.awt is accessible from more than one module: , jav

6条回答
  •  爱一瞬间的悲伤
    2020-11-29 09:08

    You can do what other people suggest which is to exclude xml-apis which worked fine with me, but if your are using and an old jaxb-api replace them with jakarta.xml.bind-api:

    
        jakarta.xml.bind
        jakarta.xml.bind-api
        2.3.3
    
    

    and of course upgrade your jaxb-impl to match the same api:

    
        com.sun.xml.bind
        jaxb-impl
        2.3.3
    
    

提交回复
热议问题