 |
 |
Suggest Mac API method for launching an application.
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: May 2001
Location: India
Status:
Offline
|
|
hi,
I want to open any application based on the extension of the file through my java program. For example, if i have a abc.doc file then it must be launched in MS Word.
For this i have used native method (JNI approach) and used Window API method, ShellExecute(). Now i want the same thing using Mac API.
So can anyone tell me a Mac API method for doing the same.
Please help. Its urgent.
Thanx n Regds.
Rachna
|
|
|
| |
|
|
|
 |
|
 |
|
curmi2
|
|
I don't know if there is an API. However, there is a command line program called "Open" I think - which will Open a file with the application associated with it. You might be able to do something like
system("Open file.doc");
but I'm not sure.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Apr 2001
Location: europe
Status:
Offline
|
|
|
|
|
Nasrudin sat on a river bank when someone shouted to him from the opposite side: "Hey! how do I get across?" "You are across!" Nasrudin shouted back.
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: May 2001
Location: India
Status:
Offline
|
|
thanx very much for the reply. It helped me very much.
open command is allowing me to open any file in its associated Application from the local disk.
Now my problem is that, i want to open the web page, like www.google.com in the default browser. For this i tried: open http://www.google.com, or http://www.abc.com/xyz.html
But this command is not able to do so.
i think its searching only the local drive for the required file.
Now what should i do?
|
|
|
| |
|
|
|
 |
|
 |
|
curmi2
|
|
Not sure how to do this. Sorry. Maybe the link that Developer supplied will help?
|
|
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Nov 2000
Location: New Yawk
Status:
Offline
|
|
Moving this to the OS X Developer forum. Click through to find yourself.
thanks
------------------
the oddball newsletter
------------------
it's only after you lose everything that you're free to do anything
|
|
"Do not be too positive about things. You may be in error." (C. F. Lawlor, The Mixicologist)
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Please try one forum next time. It's more than enough.
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |