Java ::posix_spawnp permission denied


When using lldb with Maverick to debug a java application, a permission deny error on posix_spawnp.

Error: error: ::posix_spawnp( pid => 88852, path = … err = permission denied.

Does lldb has any limitation on this? What’s the possible way to fix this?



Permission denied can apply to a bunch of different things:
1 - no permissions for the executable or the executable is from a different user
2 - one of the file rules was using a file that someone didn't have correct permissions (usually the stdin/out/err file handles that we pass down)

So you will need to check the permissions of the executable you are launching and also the files for stdin/out/err.

lldb doesn't know anything about launching Java applications. At present lldb knows about ordinary Unix executables, in which case we pass the binary to posix_spawn, or a .app bundle, in which case we look up the Executable key in the bundle's Info.plist and pass that to posix_spawn. I also don't know anything about how Java applications are packaged on OS X. But it would not at all surprise me if it isn't straight-forward, in which case you will have to figure out what actually gets launched when running your Java application and get lldb to run that by hand somehow.



Thank you for so many replies. Actually, this problem is from one of
our users. I am asking him more detail about this error.
What I know so far is he compiled .java to .exe by a certain compiler
and debugged .exe by lldb. It seems there is no limitation from lldb.
I will see what I can do for him. Really appreciate for your comments.