我有一个名为“TJXLineFilterPlugin”的 jar 文件。MANIFEST.MF 的值为
Manifest-Version: 1.0
Class-Path: c:\stdintjbt\java\lib\ojdbc14.jar c:\stdintjbt\java\lib\commons-lang-2.0.jar c:\stdintjbt\java\lib\jitterbit-plugin-sdk.jar c:\stdintjbt\java\lib\jitterbit-xml-utils.jar .
Created-By: 1.6.0_35 (Sun Microsystems Inc.)
Main-Class: org.jitterbit.plugins.tjx.TJXLineFilterPlugin
试过跑步
java -jar E:\TJXLineFilterPlugin.jar
jar 里面有一个文件夹结构是
org/jitterbit/plugins/tjx/TJXLineFilterPlugin.class
但它会抛出错误,例如,
Exception in thread "main" java.lang.NoClassDefFoundError: org/jitterbit/plugins
/tjx/TJXLineFilterPlugin
Caused by: java.lang.ClassNotFoundException: org.jitterbit.plugins.tjx.TJXLineFi
lterPlugin
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)
Could not find the main class: org.jitterbit.plugins.tjx.TJXLineFilterPlugin. Pr
ogram will exit.
我也尝试使用类路径运行cp
。