码迷,mamicode.com
首页 > 编程语言 > 详细

jar包运行

时间:2015-08-21 18:58:42      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:

配置mainClass:
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>cn.edu.hfut.dmic.webcollector.example.TutorialCrawler2</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

run as->clean

run as->install

java -jar projectName.jar

 

jar包运行

标签:

原文地址:http://www.cnblogs.com/timdes/p/4748674.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!