WS Libs: com.sun.xml vs javax.xml

The same Java WebServices API and IMPL classes exist in these package groups, only the package names are different.

Which ones should be used in my code? I would prefer NON-com.sun. * According to java conventions, but still my dependencies (e.g. Spring) use implementations from com.sun. * OR I can not find the implementation package in javax.xml

Does anyone have any experience with this?

+3
source share
1 answer

javax.xml - com.sun Java API Java, , -, Sun Java.

: , "sun" Packages

, , . factory , , XML, , . , SAX, :

import javax.xml.parsers.*;

SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
+2

Source: https://habr.com/ru/post/1750213/


All Articles