Gate 的新手,实际上对 Java 和 Eclipse 也不老;)并且想要运行第一个设置测试。
我做了什么:
下载gate-7.0-build4195-ALL并解压到C:\
将环境变量 CLASSPATH 更改为 ".;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar;C:\gate-7.0-build4195-ALL\bin\gate.jar;C:\gate-7.0-build4195-全部\lib"
在 Eclipse 中创建了一个新的 java 项目,并导航到 gate.jar\gate\TestGate.class 并运行它。
然后我收到以下错误:
Failed to invoke suite(): java.lang.NoClassDefFoundError: org/apache/log4j/Logger
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.getTest(JUnit3TestLoader.java:108)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.loadTests(JUnit3TestLoader.java:59)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at gate.Gate.<clinit>(Gate.java:83)
at gate.TestGate.suite(TestGate.java:126)
... 10 more
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 12 more
我错过了什么?
谢谢你