4 ms·
It is unlikely that Android will run Java bytecode. The Dalvik runtime was aimed at keeping bytcode compact and interpreting faster than a JVM. ART is a pre-com
by Zigurd 11y ago
It is unlikely that Android will run Java bytecode. The Dalvik runtime was aimed at keeping bytcode compact and interpreting faster than a JVM. ART is a pre-compiling (Dalvik bytecode to native) runtime. Using Java bytecode in the runtime on the Android device would open a whole big can of worms again. With open source APIs and no actual Java(tm) technology in an apk or on a device once code is translated from Java bytecode to Dalvik bytecode, Android stays clear of Oracle copyright claims.
- yincrash 11y agoYou can actually load Java bytecode on Android (since 1.x!) by manually using a separate classloader at runtime[1]. There are even J2ME runners that have been doing that since Android's early days[2]. [1] http://stackoverflow.com/questions/60764/how-should-i-load-jars-dynamically-at-runtime http://stackoverflow.com/questions/60764/how-should-i-load-j... [2] http://www.netmite.com/android/faq.html http://www.netmite.com/android/faq.html
- Zigurd 11y agoThose approaches "dex" the Java bytecode and run Dalvik bytecode.