如何在swt工具提示中隐藏程序名称

Tej*_*eja 5 java eclipse swt jvm tooltip

我目前正在使用eclipse swt工具包开发Java应用程序.我将我的应用程序部署为jar文件,该文件由Java进程运行.

我需要显示一个气球通知,我正在使用ToolTipSWT库.奇怪的是,随着最新的Windows 10更新,工具提示已开始在底部显示程序名称,这非常烦人.由于主机进程是java,它显示了JAVA(TM)Platform SE Binary.如何隐藏此程序名称/给它我的自定义名称?

在此输入图像描述

这就是我从应用程序开始的方式

"C:\Program Files (x86)\Java\jre1.8.0_162\bin\javaw.exe" -jar "C:\Desktop\MyApplication.jar"
Run Code Online (Sandbox Code Playgroud)

我尝试启动我的程序,如下所示,给出一个特定的名称.它也没有帮助

"C:\Program Files (x86)\Java\jre1.8.0_162\bin\javaw.exe" -Dname=Foobar -jar "C:\Desktop\MyApplication.jar"
Run Code Online (Sandbox Code Playgroud)

这就是我显示工具提示的方式

Shell shell = new Shell(display);
tip = new ToolTip(shell, SWT.BALLOON | iconType);
tip.setAutoHide(false);
tip.setMessage(detail); //tooltip description
tip.setText(heading); // this is the title of tooltip
trayIcon.setToolTip(tip);  //this is my app tray icon
tip.setVisible(true);
Run Code Online (Sandbox Code Playgroud)

gre*_*449 0

您可以通过调用来设置 SWT 应用程序的名称

Display.setAppName("app name");
Run Code Online (Sandbox Code Playgroud)

readAndDispatch您应该在主循环启动之前尽早在应用程序中调用此函数。