简体   繁体   English

如何从Mac的Dock启动Java应用程序

[英]How to launch java application from Dock, Mac

I have created a Java Swing application. 我创建了一个Java Swing应用程序。 It works fine. 工作正常。

I have created application file (.app) for that application using jar bundler. 我已经使用jar bundler为该应用程序创建了应用程序文件(.app)。

But the main problem is that my application does not open if I click it on the Dock. 但是主要的问题是,如果我在Dock上单击它,则无法打开我的应用程序。 I am using Mac OS. 我正在使用Mac OS。 How I can launch my application by clicking on Dock 我如何通过单击Dock来启动我的应用程序

Thanks Sunil Kumar Sahoo 感谢Sunil Kumar Sahoo

If you are using Apple's JavaApplicationStub , diagnostic output from the launch process may be obtained as follows: 如果您使用的是Apple的JavaApplicationStub ,则可以通过以下方式获得启动过程的诊断输出:

$ export JAVA_LAUNCHER_VERBOSE
$ ./your.app/Contents/MacOS/JavaApplicationStub

Here's a working example . 这是一个有效的例子

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM