Re: Launching Mac applications and passing parameters
Subject : Re: Launching Mac applications and passing parameters
From: Thomas Singer <email@hidden >
Date: Sat, 07 Jan 2006 17:07:50 +0100
Delivered-to: email@hidden
Delivered-to: email@hidden
User-agent: Thunderbird 1.5 (Macintosh/20051201)
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"
});
--
Thanks in advance,
Tom
Michael Hall wrote:
On Jan 7, 2006, at 8:56 AM, Thomas Singer wrote:
Hi,
Most likely this is a dumb question, but I searched google and could
not find an answer: how do I run Mac applications and pass parameters
(from Java)? I've tried something like
Runtime.getRuntime().exec(new String[] {
"/Applications/Preview.app/Contents/MacOS/Preview",
"/Users/tom/test.png"
});
But that just opens the Preview application without opening the
graphic. Is there a general way like "start foo.png" on Windows?
I would guess the 'open' command would do what you want, you might want
to 'man' that in Terminal for usage.
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
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.