I search in Internet many information, but I don't know what's porblem is that... Please, check this:
Manifest:
Manifest-Version: 1.0
Main-Class: BotPolytechnic
POM:
<groupId>FPolytechnic</groupId>
<artifactId>FPolytechnic</artifactId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<archive>
<manifest>
<mainClass>BotPolytechnic</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
use instead the maven-jar-plugin to make the JAR executable:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>fully.qualified.MainClass</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.