0
我想在linux上運行這個命令......編譯成功,但運行時卻出錯。 執行此命令:在linux上設置類路徑來運行java程序
java -cp .:/smash/same/hope/ant-launcher-1.6.1.jar src.vp
輸出
Setting the value for property-debug
Fusion Repository/asd/file/repo
Logs Directory
Running validations
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Project
at src.vp.call(vp.java:114)
at src.vp.main(vp.java:172)
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.Project
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
... 2 more
可有一個人幫我解決它...
非常感謝....我在編譯期間添加了它....但在運行時忘記了....謝謝! – user1731553