JDK 10 cannot import javax.xml.namespace in Eclipse

前端 未结 4 1794
孤街浪徒
孤街浪徒 2020-12-19 11:39

It\'s very strange. I am moving a dynamic web project from Java 8 to Java 10.

The last thing I cannot get the dependency resolved is the javax.xml.namespace.QName cl

4条回答
  •  自闭症患者
    2020-12-19 12:15

    I had the same error moving from Java 8 to Java 11, and I included an explicit dependency on the library stax-api 1.0-2:

    
      javax.xml.stream
      stax-api
      1.0-2
    
    

    and excluded any transitional dependency on the library stax-api 1.0.1:

        ...
        
          stax
          stax-api
        
        ...
    

    After this, my IDE found the lost import javax.xml.namespace.QName correctly.

    I hope this helps.

提交回复
热议问题