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: Launching Mac applications and passing parameters




On Jan 7, 2006, at 10:07 AM, Thomas Singer wrote:

I would guess the 'open' command would do what you want, you might want to 'man' that in Terminal for usage.

Thanks, that works to launch the default application.

Do you also know, what's wrong with the following code snippet:

 Runtime.getRuntime().exec(new String[] {
   "/Applications/Preview.app/Contents/MacOS/Preview",
   "/Users/tom/test.png"
 });


I think there's usage for specifying other than the default application.
Not sure why that doesn't work. It doesn't open the document command line from Terminal either, probably different in how this application launches or handles it's open document AppleEvent? TextEdit command line launched with a text file will open the document.


Mike Hall        mikehall at spacestar dot net
http://www.spacestar.net/users/mikehall
http://sourceforge.net/projects/macnative



_______________________________________________
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: 
 >Launching Mac applications and passing parameters (From: Thomas Singer <email@hidden>)
 >Re: Launching Mac applications and passing parameters (From: Michael Hall <email@hidden>)
 >Re: Launching Mac applications and passing parameters (From: Thomas Singer <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.