There's another solution that also works.
(还有另一个解决方案也可以。)
- Go to the Build Path settings in the project properties.
(转到项目属性中的“ 构建路径”设置。)
- Remove the JRE System Library
(删除JRE系统库)
- Add it back;
(加回去;)
Select "Add Library" and select the JRE System Library . (选择“添加库”,然后选择JRE系统库 。)
The default worked for me. (默认为我工作。)
This works because you have multiple classes in different jar files.
(之所以可行,是因为您在不同的jar文件中有多个类。)
Removing and re-adding the JRE lib will make the right classes be first. (删除并重新添加JRE库将使正确的类成为第一位。)
If you want a fundamental solution make sure you exclude the jar files with the same classes. (如果需要基本解决方案,请确保排除具有相同类的jar文件。)
For me I have: javax.xml.soap.SOAPPart
in three different jars: axis-saaj-1.4.jar
, saaj-api-1.3.jar
and the rt.jar
(对我来说,我有: javax.xml.soap.SOAPPart
位于三个不同的jar中: axis-saaj-1.4.jar
, saaj-api-1.3.jar
和rt.jar
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…