【发布时间】:2021-01-21 19:11:59
【问题描述】:
我是 Intellij、macOS 和 gradle 的新手,我想从与 gradle 守护进程相关的 macOS 扩展坞中隐藏 Java 图标。从命令行运行时,在我的 zshenv(类似于 bashrc 或 bash_profile)中设置 JAVA_TOOL_OPTIONS="-Dapple.awt.UIElement=true(如 here 所述)就足够了,但从 Intellij 运行构建时不起作用。
我还尝试在我的主 gradle.properties 文件中使用具有相同标志 (org.gradle.jvmargs=-Dapple.awt.UIElement=true) 的 org.gradle.jvmargs 设置守护程序标志,但所有 -D 标志都以某种方式被剥离(无论它是否正在运行来自终端或 Intellij,这似乎是它自己的问题,given that you should be able to set -D flags with this parameter),因此没有效果。
肯定有一种简单的方法可以做到这一点?
【问题讨论】:
-
is sufficient when running from the command line- 你如何从命令行运行?以及如何从 IDE 运行它? -
在命令行中,简单的
./gradlew task;在 IDE 中,我单击构建图标(锤子)。
标签: java macos gradle intellij-idea jvm