I have a jar file in my app local data "/data/data/ro.lisamobile/files/ echo.jar". I want to load the class "lisa.modules.echo.EchoModule" which resides in my jar.
I am using java.net.URLClassLoader to load the class. On an non android environment the code works, on android it gives me this exception "can't load this type of class file". Do you know why is that ? Thanks. Below it's an output of Logcat: 03-22 14:46:53.676: WARN/file(779): file:/data/data/ro.lisamobile/ files/echo.jar 03-22 14:46:53.776: INFO/ActivityManager(563): Displayed activity ro.lisamobile/.LisaMobile: 3976 ms 03-22 14:46:53.816: ERROR/dalvikvm(779): ERROR: defineClass(0x4364dfe0, lisa.modules.echo.EchoModule, 0x436549a0, 0, 1, 0x43655b58) 03-22 14:46:53.826: WARN/System.err(779): java.lang.UnsupportedOperationException: can't load this type of class file 03-22 14:46:53.835: WARN/System.err(779): at java.lang.VMClassLoader.defineClass(Native Method) 03-22 14:46:53.846: WARN/System.err(779): at java.lang.ClassLoader.defineClass(ClassLoader.java:338) 03-22 14:46:53.865: WARN/System.err(779): at java.security.SecureClassLoader.defineClass(SecureClassLoader.java: 123) 03-22 14:46:53.875: WARN/System.err(779): at java.net.URLClassLoader.findClassImpl(URLClassLoader.java:1220) 03-22 14:46:53.875: WARN/System.err(779): at java.net.URLClassLoader$4.run(URLClassLoader.java:629) 03-22 14:46:53.875: WARN/System.err(779): at java.net.URLClassLoader$4.run(URLClassLoader.java:628) -- 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.