从命令行运行intellij idea项目 [英] Run intellij idea project from command line

查看:716
本文介绍了从命令行运行intellij idea项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个相当大的项目,它是用intellij Idea开发的。现在我必须能够从命令行运行它,但是使用了包括maven依赖项在内的库太多了。
有没有一种方法可以让intellij idea在运行项目时使用命令行?

I have quite massive project which was developed in intellij Idea. Now I have to be able to run it from command line, but there are too many libraries including maven dependencies are used.
Is there a way to get command line that is used by intellij idea when it runs a project?

推荐答案

如果您使用maven,则可以执行以下操作:

If you use maven you can do this:

mvn install
mvn exec:java -Dexec.mainClass="com.module.Main" -Dexec.classpathScope=runtime  

这篇关于从命令行运行intellij idea项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆