我一直在努力解決這個常見的錯誤,只是無法解決它。此應用程序由多個軟件包組成,並且可以在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
任何人都可以看到我在做什麼錯在這裏?