Re: [android-developers] Re: Dynamically loading a .jar file at Runtime

2017-09-05 Thread 'Carmel Noe' via Android Developers


On Tue, 9/5/17, Larry D <francog...@gmail.com> wrote:

 Subject: Re: [android-developers] Re: Dynamically loading a .jar file at  
Runtime
 To: "Android Developers" <android-developers@googlegroups.com>
 Cc: hack...@android.com
 Date: Tuesday, September 5, 2017, 10:54 PM
 
 Always the idiot who
 will not usefully reply to the question but instead offer
 unsolicited and related bull under false pretenses. Where
 are the moderators to block those imbeciles instead of
 moralizing and bullying the good people providing adequate
 support?
 
 On Thursday, March 19, 2009 at 4:03:09 AM UTC+1, Dianne
 Hackborn wrote:Also keep in mind that doing this
 kind of thing is completely insecure.  Any app can go and
 modify your files on the sd card to insert their own code
 into your app and run under your identity.  Then any
 malicious things they do with your app's permissions are
 the fault of your app.
 
 
 On Wed, Mar 18, 2009
 at 4:39 PM, fadden <fad...@android.com> wrote:
 
 
 
 On Mar 18, 7:29 am, Asif k <asifk1...@gmail.com> wrote:
 
 >   I am storing the required test.jar file in the
 /sdcard. I want to
 
 > load it dynamically at runtime and want to execute a
 function xyz()
 
 > resides in that. For this purpose
 
 >
 
 >   I had written following code ,
 
 
 
 This doesn't work -- in 1.0 you can't load
 jar/apk files that aren't
 
 part of your application.  The problem is that it wants to
 pull
 
 classes.dex out of the jar/apk and put it in
 /data/dalvik-cache, but
 
 it doesn't have permission to do so.
 
 
 
 The "cupcake" release is expected to include the
 DexClassLoader class,
 
 which allows you to specify a location other than
 /data/dalvik-cache
 
 for your output files.
 
 
 
 
 
 > But got ClassCastException :
 dalvik.system.PathClassLoader
 
 
 
 URLClassLoader systemLoader = (URLClassLoader)
 ClassLoader
 
             .getSystemClassLoader();
 
 
 
 Assuming that the system class loader is a
 URLClassLoader is unwise
 
 and unnecessary.  Just use ClassLoader.
 
 
 
 
 
 
 
 
 -- 
 Dianne Hackborn
 Android framework engineer
 hac...@android.com
 
 Note: please don't send private questions to me, as I
 don't have time to provide private support.  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 unsubscribe from this group and stop receiving emails
 from it, send an email to android-developers+unsubscr...@googlegroups.com.
 
 To post to this group, send email to android-developers@googlegroups.com.
 
 Visit this group at https://groups.google.com/group/android-developers.
 
 To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/ed0961a7-5cb2-42db-9a65-1cb59374ee0c%40googlegroups.com.
 
 For more options, visit https://groups.google.com/d/optout.
 rturi sociale si a unor institutii se desfasura in conditiile in care  in 
sectorul

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/1952405598.3548385.1504655451035%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: Dynamically loading a .jar file at Runtime

2017-09-05 Thread Larry D
Always the idiot who will not usefully reply to the question but instead 
offer unsolicited and related bull under false pretenses. Where are the 
moderators to block those imbeciles instead of moralizing and bullying the 
good people providing adequate support?

On Thursday, March 19, 2009 at 4:03:09 AM UTC+1, Dianne Hackborn wrote:
>
> Also keep in mind that doing this kind of thing is completely insecure.  
> Any app can go and modify your files on the sd card to insert their own 
> code into your app and run under your identity.  Then any malicious things 
> they do with your app's permissions are the fault of your app.
>
> On Wed, Mar 18, 2009 at 4:39 PM, fadden  
> wrote:
>
>>
>> On Mar 18, 7:29 am, Asif k  wrote:
>> >   I am storing the required test.jar file in the /sdcard. I want to
>> > load it dynamically at runtime and want to execute a function xyz()
>> > resides in that. For this purpose
>> >
>> >   I had written following code ,
>>
>> This doesn't work -- in 1.0 you can't load jar/apk files that aren't
>> part of your application.  The problem is that it wants to pull
>> classes.dex out of the jar/apk and put it in /data/dalvik-cache, but
>> it doesn't have permission to do so.
>>
>> The "cupcake" release is expected to include the DexClassLoader class,
>> which allows you to specify a location other than /data/dalvik-cache
>> for your output files.
>>
>>
>> > But got ClassCastException : dalvik.system.PathClassLoader
>>
>> URLClassLoader systemLoader = (URLClassLoader) ClassLoader
>>.getSystemClassLoader();
>>
>> Assuming that the system class loader is a URLClassLoader is unwise
>> and unnecessary.  Just use ClassLoader.
>>
>>
>>
>
>
> -- 
> Dianne Hackborn
> Android framework engineer
> hac...@android.com 
>
> Note: please don't send private questions to me, as I don't have time to 
> provide private support.  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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/ed0961a7-5cb2-42db-9a65-1cb59374ee0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Dynamically loading a jar file at runtime

2012-06-11 Thread Chris Stratton
On Jun 11, 2:30 pm, TreKing treking...@gmail.com wrote:
 On Mon, Jun 11, 2012 at 2:11 AM, Reddy devireddy@gmail.com wrote:
  I have a requirement that i need to download a jar file dynamically at
  runtime and use a function present in the jar.

 I would expect that this would not be possible, for what should be obvious
 security concerns.

It would be extremely difficult to prevent an application from
executing externally-obtained native code, and as a result there's not
really any reason to go to great lengths to make it impossible to do
so with dalvik code. How tricky it is to do this with dalvik code is a
valid question, but it is probably possible.

-- 
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: Dynamically loading a jar file at runtime

2012-06-11 Thread Chris Stratton
On Jun 12, 1:00 am, Reddy devireddy@gmail.com wrote:
 1. Jar files contains some encryption/decryption algorithms.
 2. Algorithms should not present in the application.

I really hope you aren't hoping that will prevent others from seeing
those algorithms.

-- 
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


Re: [android-developers] Re: Dynamically loading a jar file at runtime

2012-06-11 Thread Kristopher Micinski
On Tue, Jun 12, 2012 at 1:41 AM, Chris Stratton cs07...@gmail.com wrote:
 On Jun 11, 2:30 pm, TreKing treking...@gmail.com wrote:
 On Mon, Jun 11, 2012 at 2:11 AM, Reddy devireddy@gmail.com wrote:
  I have a requirement that i need to download a jar file dynamically at
  runtime and use a function present in the jar.

 I would expect that this would not be possible, for what should be obvious
 security concerns.

 It would be extremely difficult to prevent an application from
 executing externally-obtained native code, and as a result there's not
 really any reason to go to great lengths to make it impossible to do
 so with dalvik code. How tricky it is to do this with dalvik code is a
 valid question, but it is probably possible.


Hmm... sorry, I'm not sure I understand what you're saying?

It seems easy to do this, you can't inject code into the vm
(especially native code), without using something like a
DexClassLoader, basically.

Do you instead mean that there are necessary situations when this
should be provided?   (I think I buy that more, and it fits with the
rest of what you're saying better.)

Kris

-- 
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


Re: [android-developers] Re: Dynamically loading a .jar file at Runtime

2010-03-23 Thread Dianne Hackborn
/data/app-private is not your directory, and not for applications to touch.

Please read the SDK documentation on files and storage.

On Thu, Mar 19, 2009 at 3:04 AM, Asif k asifk1...@gmail.com wrote:


 Yes I can push file to /data/app-private/ directory using DDMS but not
 programmatically.

  But I want to call .jar file at runtime to complete my task. Please
 any suggestion

 On Mar 19, 12:19 pm, Dianne Hackborn hack...@android.com wrote:
  You can put whatever you want in your private data directory.
 
 
 
 
 
  On Wed, Mar 18, 2009 at 11:15 PM, Asif k asifk1...@gmail.com wrote:
 
   Hi Dianne,
 
 Yes you are right, But Is there any way to store over .jar file in
   the app's data directory. Because I am working on emulator and I can
   store any file there.
   Please tell the way I can store in the data dir.
 
 And yes any alternate idea to call the .jar files dynamically at
   runtime?? I want to call a function from the .jar file, which will be
   decided at runtime.
   Thanks in advance.
 
   Regards,
 
   Asif Kadiwala
   On Mar 19, 11:02 am, Dianne Hackborn hack...@android.com wrote:
On Wed, Mar 18, 2009 at 10:18 PM, Asif k asifk1...@gmail.com
 wrote:
   Security will be one concern but , my plan is to load the
 required .jar files in the sdcard only when it is necessary and I
 will
 remove that .jar files from the /sdcard when my application
 execution
 completes.
 
That doesn't fix the security hole, just makes it a little harder for
   people
to exploit.  Not much, though, since they can easily monitor the
   directory
where you place them.
 
Why not just put them in your app's data directory, which nobody else
 can
touch?
 
   I want to do this because I wanna run different things, those
 will
 be decided at runtime. I think this is same concept as that of .dll
 ( Dynamic link Lib) in the .net framework.
 
And dlls also have serious security issues if you put them in a place
   where
others can modify them.  It's not as much of a concern on Windows,
   though,
because its security is much looser and all of the apps tend to run
 as
   the
same user, anyway.
 
--
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.  All such questions should be posted on
 public
forums, where I and others can see and answer them.
 
  --
  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.  All such questions should be posted on public
  forums, where I and others can see and answer them.- Hide quoted text -
 
  - Show quoted text -
 --~--~-~--~~~---~--~~
 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
 -~--~~~~--~~--~--~---




-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Dynamically loading a .jar file at Runtime

2009-03-19 Thread Dianne Hackborn
On Wed, Mar 18, 2009 at 10:18 PM, Asif k asifk1...@gmail.com wrote:

   Security will be one concern but , my plan is to load the
 required .jar files in the sdcard only when it is necessary and I will
 remove that .jar files from the /sdcard when my application execution
 completes.


That doesn't fix the security hole, just makes it a little harder for people
to exploit.  Not much, though, since they can easily monitor the directory
where you place them.

Why not just put them in your app's data directory, which nobody else can
touch?


   I want to do this because I wanna run different things, those will
 be decided at runtime. I think this is same concept as that of .dll
 ( Dynamic link Lib) in the .net framework.


And dlls also have serious security issues if you put them in a place where
others can modify them.  It's not as much of a concern on Windows, though,
because its security is much looser and all of the apps tend to run as the
same user, anyway.

-- 
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.  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
-~--~~~~--~~--~--~---



[android-developers] Re: Dynamically loading a .jar file at Runtime

2009-03-19 Thread Asif k


Hi Dianne,

   Yes you are right, But Is there any way to store over .jar file in
the app's data directory. Because I am working on emulator and I can
store any file there.
Please tell the way I can store in the data dir.

   And yes any alternate idea to call the .jar files dynamically at
runtime?? I want to call a function from the .jar file, which will be
decided at runtime.
Thanks in advance.

Regards,

Asif Kadiwala
On Mar 19, 11:02 am, Dianne Hackborn hack...@android.com wrote:
 On Wed, Mar 18, 2009 at 10:18 PM, Asif k asifk1...@gmail.com wrote:
    Security will be one concern but , my plan is to load the
  required .jar files in the sdcard only when it is necessary and I will
  remove that .jar files from the /sdcard when my application execution
  completes.

 That doesn't fix the security hole, just makes it a little harder for people
 to exploit.  Not much, though, since they can easily monitor the directory
 where you place them.

 Why not just put them in your app's data directory, which nobody else can
 touch?

    I want to do this because I wanna run different things, those will
  be decided at runtime. I think this is same concept as that of .dll
  ( Dynamic link Lib) in the .net framework.

 And dlls also have serious security issues if you put them in a place where
 others can modify them.  It's not as much of a concern on Windows, though,
 because its security is much looser and all of the apps tend to run as the
 same user, anyway.

 --
 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.  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
-~--~~~~--~~--~--~---



[android-developers] Re: Dynamically loading a .jar file at Runtime

2009-03-19 Thread Dianne Hackborn
You can put whatever you want in your private data directory.

On Wed, Mar 18, 2009 at 11:15 PM, Asif k asifk1...@gmail.com wrote:



 Hi Dianne,

   Yes you are right, But Is there any way to store over .jar file in
 the app's data directory. Because I am working on emulator and I can
 store any file there.
 Please tell the way I can store in the data dir.

   And yes any alternate idea to call the .jar files dynamically at
 runtime?? I want to call a function from the .jar file, which will be
 decided at runtime.
 Thanks in advance.

 Regards,

 Asif Kadiwala
 On Mar 19, 11:02 am, Dianne Hackborn hack...@android.com wrote:
  On Wed, Mar 18, 2009 at 10:18 PM, Asif k asifk1...@gmail.com wrote:
 Security will be one concern but , my plan is to load the
   required .jar files in the sdcard only when it is necessary and I will
   remove that .jar files from the /sdcard when my application execution
   completes.
 
  That doesn't fix the security hole, just makes it a little harder for
 people
  to exploit.  Not much, though, since they can easily monitor the
 directory
  where you place them.
 
  Why not just put them in your app's data directory, which nobody else can
  touch?
 
 I want to do this because I wanna run different things, those will
   be decided at runtime. I think this is same concept as that of .dll
   ( Dynamic link Lib) in the .net framework.
 
  And dlls also have serious security issues if you put them in a place
 where
  others can modify them.  It's not as much of a concern on Windows,
 though,
  because its security is much looser and all of the apps tend to run as
 the
  same user, anyway.
 
  --
  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.  All such questions should be posted on public
  forums, where I and others can see and answer them.
 



-- 
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.  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
-~--~~~~--~~--~--~---



[android-developers] Re: Dynamically loading a .jar file at Runtime

2009-03-19 Thread Asif k

Yes I can push file to /data/app-private/ directory using DDMS but not
programmatically.

  But I want to call .jar file at runtime to complete my task. Please
any suggestion

On Mar 19, 12:19 pm, Dianne Hackborn hack...@android.com wrote:
 You can put whatever you want in your private data directory.





 On Wed, Mar 18, 2009 at 11:15 PM, Asif k asifk1...@gmail.com wrote:

  Hi Dianne,

    Yes you are right, But Is there any way to store over .jar file in
  the app's data directory. Because I am working on emulator and I can
  store any file there.
  Please tell the way I can store in the data dir.

    And yes any alternate idea to call the .jar files dynamically at
  runtime?? I want to call a function from the .jar file, which will be
  decided at runtime.
  Thanks in advance.

  Regards,

  Asif Kadiwala
  On Mar 19, 11:02 am, Dianne Hackborn hack...@android.com wrote:
   On Wed, Mar 18, 2009 at 10:18 PM, Asif k asifk1...@gmail.com wrote:
  Security will be one concern but , my plan is to load the
required .jar files in the sdcard only when it is necessary and I will
remove that .jar files from the /sdcard when my application execution
completes.

   That doesn't fix the security hole, just makes it a little harder for
  people
   to exploit.  Not much, though, since they can easily monitor the
  directory
   where you place them.

   Why not just put them in your app's data directory, which nobody else can
   touch?

  I want to do this because I wanna run different things, those will
be decided at runtime. I think this is same concept as that of .dll
( Dynamic link Lib) in the .net framework.

   And dlls also have serious security issues if you put them in a place
  where
   others can modify them.  It's not as much of a concern on Windows,
  though,
   because its security is much looser and all of the apps tend to run as
  the
   same user, anyway.

   --
   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.  All such questions should be posted on public
   forums, where I and others can see and answer them.

 --
 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.  All such questions should be posted on public
 forums, where I and others can see and answer them.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: Dynamically loading a .jar file at Runtime

2009-03-18 Thread fadden

On Mar 18, 7:29 am, Asif k asifk1...@gmail.com wrote:
   I am storing the required test.jar file in the /sdcard. I want to
 load it dynamically at runtime and want to execute a function xyz()
 resides in that. For this purpose

   I had written following code ,

This doesn't work -- in 1.0 you can't load jar/apk files that aren't
part of your application.  The problem is that it wants to pull
classes.dex out of the jar/apk and put it in /data/dalvik-cache, but
it doesn't have permission to do so.

The cupcake release is expected to include the DexClassLoader class,
which allows you to specify a location other than /data/dalvik-cache
for your output files.


 But got ClassCastException : dalvik.system.PathClassLoader

URLClassLoader systemLoader = (URLClassLoader) ClassLoader
.getSystemClassLoader();

Assuming that the system class loader is a URLClassLoader is unwise
and unnecessary.  Just use ClassLoader.

--~--~-~--~~~---~--~~
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: Dynamically loading a .jar file at Runtime

2009-03-18 Thread Dianne Hackborn
Also keep in mind that doing this kind of thing is completely insecure.  Any
app can go and modify your files on the sd card to insert their own code
into your app and run under your identity.  Then any malicious things they
do with your app's permissions are the fault of your app.

On Wed, Mar 18, 2009 at 4:39 PM, fadden fad...@android.com wrote:


 On Mar 18, 7:29 am, Asif k asifk1...@gmail.com wrote:
I am storing the required test.jar file in the /sdcard. I want to
  load it dynamically at runtime and want to execute a function xyz()
  resides in that. For this purpose
 
I had written following code ,

 This doesn't work -- in 1.0 you can't load jar/apk files that aren't
 part of your application.  The problem is that it wants to pull
 classes.dex out of the jar/apk and put it in /data/dalvik-cache, but
 it doesn't have permission to do so.

 The cupcake release is expected to include the DexClassLoader class,
 which allows you to specify a location other than /data/dalvik-cache
 for your output files.


  But got ClassCastException : dalvik.system.PathClassLoader

 URLClassLoader systemLoader = (URLClassLoader) ClassLoader
.getSystemClassLoader();

 Assuming that the system class loader is a URLClassLoader is unwise
 and unnecessary.  Just use ClassLoader.

 



-- 
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.  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
-~--~~~~--~~--~--~---



[android-developers] Re: Dynamically loading a .jar file at Runtime

2009-03-18 Thread Asif k

Hi all,

  Thanks for your reply.

   Security will be one concern but , my plan is to load the
required .jar files in the sdcard only when it is necessary and I will
remove that .jar files from the /sdcard when my application execution
completes.

   I want to do this because I wanna run different things, those will
be decided at runtime. I think this is same concept as that of .dll
( Dynamic link Lib) in the .net framework.

On Mar 19, 8:03 am, Dianne Hackborn hack...@android.com wrote:
 Also keep in mind that doing this kind of thing is completely insecure.  Any
 app can go and modify your files on the sd card to insert their own code
 into your app and run under your identity.  Then any malicious things they
 do with your app's permissions are the fault of your app.





 On Wed, Mar 18, 2009 at 4:39 PM, fadden fad...@android.com wrote:

  On Mar 18, 7:29 am, Asif k asifk1...@gmail.com wrote:
     I am storing the required test.jar file in the /sdcard. I want to
   load it dynamically at runtime and want to execute a function xyz()
   resides in that. For this purpose

     I had written following code ,

  This doesn't work -- in 1.0 you can't load jar/apk files that aren't
  part of your application.  The problem is that it wants to pull
  classes.dex out of the jar/apk and put it in /data/dalvik-cache, but
  it doesn't have permission to do so.

  The cupcake release is expected to include the DexClassLoader class,
  which allows you to specify a location other than /data/dalvik-cache
  for your output files.

   But got ClassCastException : dalvik.system.PathClassLoader

  URLClassLoader systemLoader = (URLClassLoader) ClassLoader
             .getSystemClassLoader();

  Assuming that the system class loader is a URLClassLoader is unwise
  and unnecessary.  Just use ClassLoader.

 --
 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.  All such questions should be posted on public
 forums, where I and others can see and answer them.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---