0

I have used the jarbundler ant task to create an OSX (10.6.4) XXX.app for my java app. The problem is that it starts fine in any other directory except the /Applications directory. A look at file permissions shows nothing amiss. I can get it to work by two methods - both not suitable for real deployments:

  1. Build the .app with Jar Bundler GUI (hard to automate repeatedly)
  2. Start and stop the .app file in another directory (e.g. my build dir) and then copy the .app file into /Applications/MyAppDir (not a solution for a install script!). It then works !

The error in OS X console is:

posix_spawn("/Applications/JyroJMS.app/Contents/MacOS/JavaApplicationStub", ...): Permission denied

I have tried various options in Jar bundler task like StartOnMainThread=true.

Any suggestions ?

M A
  • 71,713
  • 13
  • 134
  • 174
NullPumpkinException
  • 1,396
  • 1
  • 18
  • 22

1 Answers1

0

I have found the problem(s): 1. I am using izpack to deploy the app bundle in a mistaken effort to standardized install process across platforms. This was causing issues with JavaApplicationStub execute permissions. 2. Also jarbundler.jar ant task is apparently using an old JavaApplicationStub. When I replaced it with java 6 version all went well.

So lessons learnt: - I will not try to create a 'universal' installer - this does not work - Will use compressed disk images to deploy my app bundle

NullPumpkinException
  • 1,396
  • 1
  • 18
  • 22
  • Also, using the zip ant task also removes the execute permission. This means you cannot bundle up the app on non-OSX, since `hdiutil` or similar is required for a `dmg`. – Daniel Beck Aug 18 '10 at 07:47
  • When why (some guy from the ruby community way back) was developing shoes for OS X [many moons ago], he faced the problem of bundling up an app for non-OS X. He eventually found a cross-platform tool from the iPhone Dev Team guys to do the DMG file creation. – nelsonjchen Nov 14 '10 at 20:25