Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Trying to Open/Delete Files with spaces in the filename
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to Open/Delete Files with spaces in the filename



On Jul 3, 2004, at 10:34 AM, James Bucanek wrote:

Don't use exec(String). Use exec(String,String[]).

String[] openArgs = { args[0] };
Process openFile = Runtime.getRuntime().exec("open",openArgs);


Thanks a lot, with some changes, it works now:
String[] openArgs = { "open", args[0] };
Process openFile = Runtime.getRuntime().exec(openArgs);

Not sure why it doesn't work with two parameters.

-gohaku
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.




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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.