5 ms·
Since Android N the Java implementation is actually OpenJDK so I guess this is primarily useful to support older Android versions.
by jsiepkes 9y ago
Since Android N the Java implementation is actually OpenJDK so I guess this is primarily useful to support older Android versions.
- deleted 9y ago[deleted]
- Filligree 9y agoIt doesn't use Dalvik anymore?
- lloeki 9y ago"Java is four things." - jwz https://www.jwz.org/doc/java.html https://www.jwz.org/doc/java.html
- cwyers 9y agoOh jwz. Maybe we're the manchildren, but maybe it's the person who redirects all HN links to a picture of a hairy scrotum that hasn't in fact grown up yet.
- jsiepkes 9y agoDalvik is a Java runtime implementation (well technically not but let's keep things simple) just like OpenJDK's hotspot; It compiles bytecode to machine language which your device (PC, smartphone, etc.) can execute. Bytecode is the thing the Java compiler produces (class files) from your Java source code. Android N only switched to the Java API (base classes) of OpenJDK. As far as I know they didn't switch runtime environment. (I know dalvik technically doesn't run bytecode but some other form of intermediary code optimized for mobile devices. I sidestepped that to keep things simple)
- dragonwriter 9y agoThey did change runtimes from Dalvik to ART, from Android L on.
- asmosoinio 9y agoNot since 5.0 (Lollipop). "The successor of Dalvik is Android Runtime (ART), which uses the same bytecode and .dex files (but not .odex files), with the succession aiming at performance improvements transparent to the end users. The new runtime environment was included for the first time in Android 4.4 "KitKat" as a technology preview,[4][5] and replaced Dalvik entirely in later versions; Android 5.0 "Lollipop" is the first version in which ART is the only included runtime." https://en.m.wikipedia.org/wiki/Dalvik_(software) https://en.m.wikipedia.org/wiki/Dalvik_(software)
- bitmapbrother 9y agoThe Dalvik runtime was replaced with ART in Android 5.
- pjmlp 9y agoThis is not 100% true, because the Android team cherry picks features from OpenJDK. I advise anyone that actually cares about Java™, to spend some time reading AOSP commits regarding OpenJDK integration.
- jsiepkes 9y agoI don't quite understand what you mean because the entire class library is of OpenJDK since Android N. Sure desktop specific API's like Swing are missing and Android has its own API's for UI and stuff but all classes from standard Java are from OpenJDK in Android. Before Android N they used to come from Apache Harmony and occasionally classes were borrowed from OpenJDK. But thats no longer the case since Android N.
- pjmlp 9y agoNot it is not, as I said read the AOSP commits. Many methods don't have a full implementation, some classes have partial implementation and not every library class from OpenJDK is taken into Android.
- bitmapbrother 9y agoI'm just confused as to why you think this is a problem? OpenJDK is an open source project and Google, or any other company, can fork it and trim as much undesirable fat as they wish. Additionally, as it has repeatedly been pointed out to you, Google does not call their fork Java not do they use any of the Java trademarks so your accusation that it fragments the language isn't true because it was never intended to be compatible with Java and the JVM. If Oracle has a problem with other companies forking OpenJDK then perhaps they should change the license for further releases or perhaps not make it "Open" anymore.
- pjmlp 9y agoBecause Google has broken Java portability, I cannot just take a random Java library and have it work on Android. Thanks to Google now I need to search for Android Java libraries, instead of Java libraries. Funny every time I search for Java on https://developer.android.com/develop/index.html https://developer.android.com/develop/index.html I get several hundred results, and yet Google doesn't call their fork Java, go figure. The difference, is that I don't live on Silicon Valley, I don't care about Google nor do I need to keep Android team happy to make a living. What I care is that now I need to write two libraries instead of one. Oracle (and Sun before) doesn't have a problem with companies that follow the license rules, there several commercial JDK vendors all of them nicely getting along with Oracle.