在IntelliJ或Eclipse中设置java系统属性 [英] Set java system properties in IntelliJ or Eclipse

查看:1515
本文介绍了在IntelliJ或Eclipse中设置java系统属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在终端命令下正确运行的项目

I have a project which runs correctly under the terminal command

mvn package exec:java -Dplatform.dependencies -Dexec.mainClass=Demo

现在,我需要在Mac上使用IntelliJ或Eclipse正确调试它(不是终端) (最好是IntelliJ)但我尝试在各个地方设置VM选项,似乎没有任何工作。

Now, I need to debug it correctly (not terminal) with IntelliJ or Eclipse on Mac (preferably IntelliJ) but I have tried setting VM options in various places and nothing seems to work.

放置这些选项的正确位置在哪里:-Dplatform.dependencies - Dexec.mainClass =演示?

Where is the correct place to put these options: -Dplatform.dependencies -Dexec.mainClass=Demo?

推荐答案

在InteliJ goto中运行 - >编辑配置
在新窗口中右窗格,打开Junit并点击你的测试。
现在,在中间单击配置选项卡并更新VM选项

In InteliJ goto "Run"->"Edit Configurations" In the new window, right panel, open the Junit and click on your test. Now, in the middle click on the "Configuration" tab and update the "VM options"

请注意,您需要为每个测试类执行此操作,但您可以从右侧面板中的junit中删除所有测试,并在默认值中更新它

Note that you will need to do this for every test class, but you can remove all the test from the junit in the right panel and update it in the "Defaults"

这篇关于在IntelliJ或Eclipse中设置java系统属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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