Mailing Lists: Apple Mailing Lists

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

trouble with open call



Hello,

I've run in several problemens using /usr/bin/open from my java application.

I have 2 general cases:

1: if  external application is not defined:
Runtime.getRuntime().exec(new String[] { "/usr/bin/open", "my file name here" });
=> works

2: if external application is defined:
Runtime.getRuntime().exec(new String[] { "/usr/bin/open",  "-a" "'path_to_external_applicaiton_which_is_100%_executable_and_works", "'my_file_here'" });
=> sometimes ok, but mostly "uhm, wtf?"..

In case 2 I have these problems:
1: external applicatin is not in the $PATH and contains a backslash{es}
2: external application is in the "/Applications/" and have spaces in the name

When using the same call from terminal, I have this error message:
$ /usr/bin/open -a '/User/me/tmp/blah\_blah.sh' 'file:/var/tmp/image.jpg'
LSOpenFromURLSpec() failed with error -1081 for the file file:/var/tmp/image.jpg.

I'm running OS X 10.5.4 and java 1.5.0_13-b05-237

Any suggestions?

Thanks,
Sergiy
 _______________________________________________
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.