I think the more important question is : "Why the fuck are you doing all of 
THAT instead of just using Java IO?"

On Tuesday, November 20, 2012 11:44:14 PM UTC+2, Lew wrote:
>
> Ali Ahmadi wrote:
>>
>> i [sic] made a android [sic] app, which works correctly.
>> now i put some parts of my application into a library and as a jar file.
>> now my code is not working
>> i read some values through this command:
>>
>> suProcess = Runtime.getRuntime().exec("ls /sdcard/folder*'");
>>   
>>       DataOutputStream oStream = new 
>> DataOutputStream(suProcess.getOutputStream());
>>
>
> The 'Process' output stream from an "ls" will not be a 'DataOutputStream'.
>  
>
>>       DataInputStream osRes = new 
>> DataInputStream(suProcess.getInputStream());
>>
>
> Likewise the input stream. "ls" is a text-oriented command.
>  
>
>>       DataInputStream errStream = new 
>> DataInputStream(suProcess.getErrorStream()); 
>
>       if (null != oStream && null != osRes && null!= errStream)
>>       {
>>           while (errStream.available()>0)
>>               errVal += errStream.readLine();
>>           while (osRes.available()>0)
>>               retval = osRes.readLine(); 
>>       }
>>
>> but nothing would return as output.
>> why this happens just when i use jar file?
>>
>
> Did you set up the project that generates the JAR as an "Android library 
> project"?
> http://developer.android.com/tools/projects/index.html#LibraryProjects
>
> Did you "create a /libs directory within your Android project directory 
> and copy the JAR file to that directory"?
> http://mobile.tutsplus.com/tutorials/android/jar-for-android/
>
> Did you google for an answer?
>
> -- 
> Lew
>
>

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

Reply via email to