How to know what JAXB implementation is used?
问题 I am using MOXy as JAXB Implementation but somehow I would like to show the Implementation Name (e.g. Moxy) and the version number on some admin screen (dynamically). How can I retrieve that info from JAXB? Cheers 回答1: You could do something like the following to figure out the JAXB impl being used: import javax.xml.bind.JAXBContext; public class Demo { private static final String MOXY_JAXB_CONTEXT = "org.eclipse.persistence.jaxb.JAXBContext"; private static final String METRO_JAXB_CONTEXT =