简体   繁体   English

MAC OS X自定义应用程序不断出现在扩展坞中

[英]MAC OS X Custom Application Keeping Bouncing in the Dock

First of all, thank you for taking the time to read this. 首先,感谢您抽出宝贵的时间阅读本文。 I am new to developing applications for the Mac and I am having some problems. 我是Mac开发应用程序的新手,但遇到了一些问题。 My application works fine, and that is not the focus of my question. 我的应用程序运行正常,这不是我的问题的重点。 Rather, I have a python program which essentially does this: 相反,我有一个python程序,该程序实际上是这样做的:

for i in values: 
    os.system(java program_and_options[i])

However, every time my program executes the java program, a java window is created in my dock (with an annoying animation) and most importantly steals the focus of my mouse and keyboard. 但是,每次我的程序执行Java程序时,都会在我的Dock中创建一个Java窗口(带有令人讨厌的动画),最重要的是,它会占用鼠标和键盘的焦点。 Then it goes away a second later, to be replaced by another Java instance. 然后一秒钟后消失,由另一个Java实例替换。 This means that my batch program cannot be used while I am interacting with my Mac, because I get a hiccup every second or more often and cannot get anything done. 这意味着我与Mac交互时无法使用我的批处理程序,因为我每秒或更频繁地打h,无法完成任何事情。 My problem is that the act of displaying something in the dock takes my focus, and I would like it not to. 我的问题是,在码头上显示某些东西的行为吸引了我的注意力,我希望不要这样做。 Is there a setting on OS X to never display something in the dock (such as Java or python)? OS X上是否设置了永远不显示扩展坞中的内容(例如Java或python)?

Is there a Mac setting or term that I should use to properly describe this problem I am having? 我是否应该使用Mac设置或术语来正确描述我遇到的这个问题? I completely lack the vocabulary to describe this problem and I hope I make sense. 我完全缺乏描述这个问题的词汇,希望我能说得通。 I appreciate any help. 感谢您的帮助。

I am running Mac OS X, Version 10.5.7 with a 1.66 GHz Intel Core Due, 2 GB memory, Macintosh HD. 我正在运行带有1.66 GHz Intel Core Due,2 GB内存,Macintosh HD的Mac OS X版本10.5.7。 I am running Python 2.5.1, java version "1.5.0_16" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284) Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing). 我正在运行Python 2.5.1,Java版本为“ 1.5.0_16” Java(TM)2 Runtime Environment,标准版(内部版本1.5.0_16-b06-284)Java HotSpot(TM)客户端VM(内部版本1.5.0_16-133,混合模式,共享)。

Thanks again, 再次感谢,

-Brian J. Stinar- -布莱恩·斯蒂纳(Brian J.

Does running Java with headless mode = true fix it? 使用headless模式= true运行Java是否可以解决问题?

http://zzamboni.org/brt/2007/12/07/disable-dock-icon-for-java-programs-in-mac-osx-howto/ http://zzamboni.org/brt/2007/12/07/disable-dock-icon-for-java-programs-in-mac-osx-howto/

As far as I am aware there is no way to disable the annoying double Java bounce without making your Java application a first class citizen on Mac OS X (much like NetBeans, or Eclipse). 据我所知,如果不使Java应用程序成为Mac OS X上的一流公民(就像NetBeans或Eclipse),就无法禁用恼人的Java双重反弹。 As for making certain programs not show in the dock, there are .plist modifications that can be made so that the program does not show up in the dock. 至于使某些程序不在扩展坞中显示,可以进行.plist修改,以使该程序不会在扩展坞中显示。 See http://www.macosxhints.com/article.php?story=20010701191518268 参见http://www.macosxhints.com/article.php?story=20010701191518268

It's certainly possible to write a Java application which doesn't display in the Dock... in fact, it's the default. 当然,有可能编写一个不显示在Dock中的Java应用程序……事实上,这是默认设置。 If your application is showing up, it must be doing something which triggers window server access -- your best bet is to try and figure out what that is. 如果您的应用程序正在显示,则必须执行触发窗口服务器访问的操作-最好的选择是尝试弄清楚那是什么。

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

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