在java打包时候碰到点问题,帮帮忙大家
我的main-class文件绝对路径是E:\workplace\project\officeManage\classes\business\FTPServer.class
我执行的操作首先打普通包:jar cvf E:\workplace\project\officeManage\officeManage.jar E:\workplace\project\officeManage\classes
然后把officeManage.jar解压到本目录,修改Manifest.mf文件,增加 : Main-Class: classes\business\FTPServer
再重新打包:java cvfm E:\workplace\project\officeManage\officeManage.jar E:\workplace\project\officeManage\META-INF\MANIFEST.MF E:\workplace\project\officeManage\classes
但是这样做下来用java -jar E:\workplace\project\officeManage\officeManage.jar运行的时候报错
Exception in thread "main "
java.lang.NoClassDefFoundError------解决方案--------------------Main-Class: classes\business\FTPServer
Main-Class不是这么写的,Main-Class:package1.package2.UrMainClass