将以下Jars添加到项目的classPath中:
SLF4J-API-1.6.3.jar SLF4J-was.jar
在Java类中:
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static Logger LOGGER = LoggerFactory.getLogger(myClass.class);
在运行时,我遇到以下异常:
Caused by: java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory
at com.ibm.beans.session.myClass.<clinit>(myClass.java:99)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:236)
... 130 more