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