[android-developers] Re: Ruuning a unix command from my application

2009-05-23 Thread Mark Murphy

karthikr wrote:
 Im trying to run an unix command from my application,

I am uncertain if the commands available in Android, few as they are,
are part of the public API, and as such perhaps should not be relied upon.

Of course, based upon your code, you've apparently decided that sticking
to public APIs is way too limiting...

 Basically I want to extract a tar file, but Im getting an I/O
 exception while running the below code.

Do you have any evidence that Android has a tar utility installed on
$PATH? I can't seem to find one.

 Can you please tell me as to how this has to be done

Find Java code that can extract tarballs.

For example, searching Google on:

java tar extract

turns up all sorts of goodness:

http://commons.apache.org/compress/

http://www.trustice.com/java/tar/ (this is a little old)
http://blog.2much2learn.com/?p=3 (recent blog post on using above code)

the tar code from Ant (http://ant.apache.org)

I'd start with Apache Commons Compress.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Need help for your Android OSS project? http://wiki.andmob.org/hado

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Ruuning a unix command from my application

2009-05-23 Thread Dianne Hackborn
On Sat, May 23, 2009 at 11:29 AM, Mark Murphy mmur...@commonsware.comwrote:

 I am uncertain if the commands available in Android, few as they are,
 are part of the public API, and as such perhaps should not be relied upon.


They are definitely not part of the supported API.


 Do you have any evidence that Android has a tar utility installed on
 $PATH? I can't seem to find one.


Nope, no tar.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---