Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird problem w/ Runtime.exec and application bundle (10.5)




On Dec 20, 2007, at 5:14 AM, Janni Kovacs wrote:

I have a java application which works fine with tiger, but doesn't
work well with leopard.
I'm trying to open the default webbrowser using:
Runtime.getRuntime().exec("open http://www.google.de");
with leopard the safari dock icon just bounces one time then stops and
safari does not open.
Console says:
Safari[2334] No Info.plist file in application bundle or no
NSPrincipalClass in the Info.plist file, exiting
com.apple.launchd[101] ([0x0-0x10b10b].com.apple.Safari[2334]) Exited
with exit code: 1

the important thing: my java application is wrapped by a standard .app
bundle. If I start the jar file manually everything works fine, as it
did with tiger.

From the symptoms you describe, this sounds like a problem with the binary stub in the bundled application.

Bundled applications that were built on certain earlier versions of the OS had a flaw in the stub that keeps them from executing in Leopard. The fix is to re-bundle the application in Leopard. The problem only happens on Intel machines, but unfortunately the workaround added to LaunchServices affects PowerPC systems as well.

The easiest way to tell if this is affecting you is to go to the Terminal and check the Mach-O headers in the binary:

% cd <path to your app>/Contents/MacOS
% otool -arch i386 -lv <app binary> | grep unknown

If something prints out, you've got a bad binary, and you should either rebuild the app on Leopard or replace the stub with an executable shell script with:

-------
#!/bin/sh
exec /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
-------

That script should work back to Mac OS X 10.3.

If any of these things don't apply, file a new bug at bugreport.apple.com. Let us know here either way what you find out.

Scott

------------------
Scott Kovatch
Apple Inc.
Java Runtime Classes
email@hidden

I am Scott Kovatch, and I approved this message.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >weird problem w/ Runtime.exec and application bundle (10.5) (From: "Janni Kovacs" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.