84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
如题,项目是使用maven的一个swing程序,想要打包成jar运行。自己的思路是新建一个artifacts,然后build这个artifacts即可。但是按照这种方式打包之后双击提示:
学习是最好的投资!
The reason for this should be that Main-Class is not specified in the manifest. Either write a bat script and call the jar command to specify it, or use jar to specify it when building gradle
jar { from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } exclude 'META-INF/MANIFEST.MF' exclude 'META-INF/LICENSE' exclude 'META-INF/*.SF' exclude 'META-INF/*.DSA' exclude 'META-INF/*.RSA' manifest { attributes "Implementation-Title": "..." attributes "Implementation-Version": version attributes "Main-Class": "..." } }
Use jar task packaging in gradle
The reason for this should be that Main-Class is not specified in the manifest. Either write a bat script and call the jar command to specify it, or use jar to specify it when building gradle
Use jar task packaging in gradle