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