我一直在努力解决这个常见的错误,只是无法解决它。此应用程序由多个软件包组成,并且可以在JCreator中正常运行(目前我需要使用此IDE而不是Eclipse)。可执行jar无法找到或加载主类
我的清单文件是在这里(有在最后2个空行):
Manifest-Version: 1.0
Created-By: 1.6.0_45 (Sun Microsystems Inc.)
Main-Class: C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\main\DPMain
我写一个bat文件创建的jar:
jar -cvfm DPlus.jar C:\COMPILE\MyProjects\douwe\classes\MANIFEST.MF C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\main*.class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\library*.class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\command*.class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\file*.class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\file\display*.class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\command*.class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\file*.class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\file\display*.class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\gui*.class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\gui*.class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\job*.class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\job*.class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\types*.class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\util*.class
当我尝试执行命令
C:\COMPILE\MyProjects\douwe\classes>java -jar DPlus.jar
我总是得到错误:
Error: Could not find or load main class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\main\DPMain
任何人都可以看到我在做什么错在这里?