Java programming NBA game interface call example code
Step 1: find the interface provided by others. For example, here I choose the interface provided by aggregate data
Step 2: apply for the corresponding appkey before using it. This parameter will be called as the parameter of the interface.
Step 3: call the interface method provided by others
The code is as follows:
Exceptions may occur when using the above code, which are generally caused by incomplete jar packages.
Question 1: throw a nestableruntimeexception
Solution: check whether the jar package is complete
Including: commons-bean utils-1.7 0.jar
commons-collections-3.1. jar
commons-lang-2.4. Jar (nestableruntimeexception will also be reported if the version is too high)
commons-logging-1.1. 1.jar
ezmorph-1.0. 6.jar
json-lib-2.1. jar
log4j. jar
Question 2: user specified log class'org apache. commons. logging. impl. Log4JLogger' cannot be found or is notuseable.
Solution: add the jar package of log4j.