无法启动基于Mavericks的应用程序 [英] Unable to launch App built on Mavericks

查看:38
本文介绍了无法启动基于Mavericks的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用于Java应用程序的应用程序,该应用程序构建在另一台服务器计算机上.该服务器计算机现在已使用Mavericks + xcode 5.1进行了升级.早些时候,我遇到了不使用Mavericks + xcode 5.1更新在服务器计算机上对我的应用程序进行签名的问题,并且我进行了如帖子-无法签署 Mac OS X 应用程序

I have an app for my Java Application that build on another server machine. This server machine now upgraded with Mavericks + xcode 5.1. Earlier I was facing the issue of not signing my app on server machine with Mavericks + xcode 5.1 update and I did the changes as mentioned in post - Failed to sign Mac OS X app

对应用签名进行更改-

#!/bin/sh
if [ -f "/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate" ]; then
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate"
elif [ -f "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate" ]; then
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate"
else
export CODESIGN_ALLOCATE="/usr/bin/codesign_allocate"
fi
codesign --deep -s "my name" MayApp.app
codesign -v MayApp.app && echo MayApp.app is Signed Successfully!

以上更改使我的应用程序成功签名,但是现在该应用程序无法启动,尝试使用此命令引发以下错误-

Above changes make my app to sign successfully, but now the app is not launching, trying with this command throwing following error -

admins-iMac-4:~ admin$ open /Users/admin/Desktop/APP/MyApp.app 
LSOpenURLsWithRole() failed with error -10810 for the file /Users/admin/Desktop/APP/MyApp.app.

环境是-

在服务器计算机上

  1. Mac版本:小牛
  2. XCode版本:5.0
  3. Java版本:Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/

我的测试机

  1. Mac版本:Mountain Lion 10.8.2
  2. Xcode版本:4.6版(4H127)
  3. Java版本:Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/

在我的计算机上,一切正常,即能够构建,运行应用程序和对应用程序进行签名.但是使用相同的代码,已构建的应用程序是带符号的,但无法在我的机器以及Mavericks机器上启动.

On my machine everything working fine i.e able to build, run app and sign app. But with same code the built app is sign but not launching at my machine as well as at Mavericks machine.

在闲聊时我发现- http://www.java.com/en/download/faq/java_mac.xml

Apple已在OS X上禁用了Oracle的Java 7u25及更低版本.更新到最新版本将允许Java在Mac OS X上运行.

如果我要从/Applications/MyAnotherApp.app/Contents/PlugIns/jdk1.7.0_21.jdk另一个工作应用程序复制较旧的JDK到MyApp,以启动我的应用程序.

If I am copying older JDK from another working app from /Applications/MyAnotherApp.app/Contents/PlugIns/jdk1.7.0_21.jdk to MyApp making my app to launch.

仅更新Java版本即可解决JDK的权限问题吗?

Is only updating the Java version solve the permission issue of JDK?

我该如何解决此问题,因为MyApp将始终在使用Mavericks + Xcode 5.1更新的服务器计算机上构建

How can I resolve the issue as MyApp will always build on server machine that updated with Mavericks + Xcode 5.1

谢谢

推荐答案

我的不启动应用程序问题已通过将Java从jdk7u21更新到最新的jdk7u45得到解决,详细信息在此处添加-如何在签名应用程序时保留别名属性?

My issue of not launching app has been resolved by updating Java from jdk7u21 to latest jdk7u45, the detailed information added here - How to preserve alias property while signing app?

谢谢

这篇关于无法启动基于Mavericks的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆