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

前端 未结 6 1741
予麋鹿
予麋鹿 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:11

    In my case, it was because I included a dependency (Apache Tika) in the POM.xml file.

    I had to force the exclusion of the module that contained the classes with errors while imported at that dependency:

        
            org.apache.tika
            tika-parsers
            1.24.1
            
                
                    xml-apis
                    xml-apis
                
            
        
    

    It worked for me that way.

提交回复
热议问题