Debug with myeclipseCodeWe often add the main method to the Java file for debugging. Sometimes the following errors may occur due to package compatibility problems, resulting in debugging failure:
**************************************** **********************
Exception in thread "Main" Java. lang. linkageerror: jaxb 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar: file:/D:/workspace/a8_common/webapp/WEB-INF/lib/jaxb-impl.jar! /COM/Sun/XML/bind/v2/model/impl/modelbuilder. Class)
Needs 2.1 API. Use the endorsed directory mechanics to place jaxb-api.jar In the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards)
**************************************** **********************
Solution: first, output the directory of the compatible package in the main function:
System. Out. println (system. getproperty ("Java. endorsed. dirs "));
My path is c: \ Program Files \ Java \ jdk1.6.0 \ JRE \ Lib \ endorsed
Then create the endorsed folder on the upper layer of this directory (here is the lib directory), copy the file jaxb-api.jar to the endorsed folder, OK to get it done