idea 在编译java 代码时,如何使用参数进行调试? 收藏

二.解决方案
在使用Idea进行本地调试时,需进行如下配置:

Preferences -> “Build, Execution, Deployment” -> Compiler -> “Java Compiler”

“Project bytecode version”设置为1.8

“Additional command line parameters”添加”-parameters”

这样,Idea在编译时,就会编译出带参数名称的(id, name, age)的文件,当不添加”-parameters”,通过(arg0, arg1, arg2)这种方式也可以进行测试。

© 版权声明
THE END
喜欢就支持以下吧
点赞0 分享
图片正在生成中,请稍后...