【问题标题】:Hide Gradle daemon's Java icon on macOS dock when using Intellij?使用 Intellij 时在 macOS 扩展坞上隐藏 Gradle 守护程序的 Java 图标?
【发布时间】: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


【解决方案1】:

在项目根目录的gradle.properties 文件中设置systemProp.apple.awt.UIElement=true 之类的属性应该可以工作。

【讨论】:

  • 您能否对如何执行此操作进行更多分析?我似乎在我的文件系统中找不到gradle.properties
猜你喜欢
  • 1970-01-01
  • 2014-10-14
  • 1970-01-01
  • 2021-11-28
  • 2012-01-09
  • 1970-01-01
  • 2021-08-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多