英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论