简体   繁体   English

Java应用程序不再在OS X 10.11 El Capitan下运行

[英]Java app no longer runs under OS X 10.11 El Capitan

We have a set of Java applications that have been working fine on OS X for years. 我们拥有一组Java应用程序,这些应用程序在OS X上可以正常工作多年。 They work fine on OS X 10.10. 它们在OS X 10.10上正常工作。

A few people just upgraded to 10.11, and one of the apps no longer runs. 几个人刚刚升级到10.11,其中一个应用程序不再运行。 It gets a: 它得到:

com.apple.xpc.launchd[1]: (com.apple.xpc.launchd.oneshot.0x10000004.OSXJavaLauncher[395]) Service exited with abnormal code: 1

Error in the console, and never starts at all. 控制台错误,根本不会启动。 (icon shows on the taskbar for just a second.) (图标在任务栏上仅显示一秒钟。)

Our other app starts just fine. 我们的其他应用程序可以正常启动。 It is built with the same Java Launcher code. 它使用相同的Java Launcher代码构建。

Is there any way to find out what OS X doesn't like about the app that fails to start? 有没有办法找出OS X对于无法启动的应用程序不满意的地方?

I was having the same problem, basically even with Java for OS X 2015-001 installed my app wouldn't start. 我遇到了同样的问题,基本上即使安装了Java for OS X 2015-001,我的应用也无法启动。 In researching this problem, I came across information on this github page , which does a really good job of explaining the issue. 在研究此问题时,我在github页面上遇到了信息,这在解释该问题方面做得非常好。 In short, Java apps built into native executables for mac using older tools will no longer work because of incompatibilities in the plist format, and applicationstubs. 简而言之,由于plist格式和applicationstubs不兼容,使用较旧工具内置于Mac的本机可执行文件中的Java应用程序将不再起作用。 Apps built for Apple's java are not running with Oracle's java and vice-versa. 为Apple的Java构建的应用程序无法与Oracle的Java一起运行,反之亦然。

Using the information from the referenced page, I rewrote our ant build using this ant task , and this application stub . 使用参考页面中的信息,我使用此ant任务和此应用程序存根(stub)重新编写了我们的ant构建。 I now have a native app that runs on both Apple's Java 6 and Oracle's Java 8 and runs in testing on OSX 10.9-10.11. 我现在有一个本机应用程序,它既可以在Apple的Java 6和Oracle的Java 8上运行,又可以在OSX 10.9-10.11上进行测试。

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

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