如何在Intellij中将一个目录包含到运行时类路径中。

huangapple go评论67阅读模式
英文:

how can I include a directory in the runtime classpath in Intellij

问题

我希望IntelliJ能够执行与以下命令等效的操作:

java -cp "target/skinny.jar:target/lib/*" com.example.ClassName arg2 arg1

请展示如何在IntelliJ IDEA中实现这一操作。

英文:

I would like to have intellij do the equivalent of:

java -cp "target/skinny.jar:target/lib/*" com.example.ClassName arg2 arg1

Please show how this can be accomplished in intellij idea.

答案1

得分: 1

你可以在目录/多个目录/ JAR 中添加库,然后将此库包含到模块依赖项中。

目前在运行/调试配置中没有提供自定义类路径的选项,因此必须在项目结构中进行设置。

英文:

You can add a library for the directory/multiple directories/jars and then include this library into the module dependencies.

There is no option to provide custom classpath in the Run/Debug configuration at the moment, so it has to be done in the Project Structure.

huangapple
  • 本文由 发表于 2020年3月4日 08:55:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/60517639.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定