标题翻译
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.
专注分享java语言的经验与见解,让所有开发者获益!
评论