On Wed, Feb 11, 2009 at 4:54 AM, Corey <[email protected]> wrote:
> Currently I am trying to write an application in Android GUI.
> One of the function will need to call one of the shell script in /
> system/xbin/.
> I write an API in C by using system("/system/xbin/test.sh"); funtion,
> and then my Java code will use this c API code to execute this shell
> script.
> However, it seems nothing happens.
> Can I call a shell script from JNI?

It's not clear to me that you need to use native code at all. If you
need it for some other reason, then ignore this.

You can use one of the several Runtime.exec() methods or the
ProcessBuilder class to execute scripts (and binaries for that
matter), directly from your high-level code.

-dan

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to