3 ms·
The only thing that matters for library interop is the bytecode version, not the "Java" version. Binary version & source version have been different attributes
by kllrnohj 8y ago
The only thing that matters for library interop is the bytecode version, not the "Java" version. Binary version & source version have been different attributes in Java going all the way back to the J2ME days.
> Rest assured when Valhalla and Panama finally land, it will only get worse.
You're assuming that Android won't have support for those, but that assumption is unfounded. Android has so far gotten support for all the bytecode-level changes that have happened like invoke-dynamic.
Java 9, 10, and 11 have not changed the bytecode. Nothing about the compiled binary has changed to require support. And outside of Flow none of the core libraries have changed, either.
There's no forking or hijacking in play here. Oracle just hasn't done anything that needs support from a runtime since Java 8.
- pjmlp 8y agoSo where is Android support for constant pools or nested class changes? Of the complete Java standard library for that matter. Of course I am assuming the worse from a company that insists in getting away with Android J++, while having fanboys supporting their agenda, many of which were even on the first row against the old J++. But I get it, the "Do no evil" company has lots of SV love.
- kllrnohj 8y ago> support for constant pools Are you thinking of Java 11's Dynamic Class-File Constants or Java 12's JVM Constants API? > nested class changes What nested class changes? > Of the complete Java standard library for that matter. What is missing other than the few new additions (like Flow) in recent versions? Or are you mistakenly considering javax.* part of the Java standard library? Because it's not, which Java 9 reinforced as part of Project Jigsaw.
- pjmlp 8y ago> What nested class changes? https://openjdk.java.net/jeps/181~ https://openjdk.java.net/jeps/181~ > What is missing other than the few new additions (like Flow) in recent versions? A big chunck of what is listed here. https://docs.oracle.com/en/java/javase/11/docs/api/index.html https://docs.oracle.com/en/java/javase/11/docs/api/index.htm... https://docs.oracle.com/en/java/javase/11/docs/specs/jni/index.html https://docs.oracle.com/en/java/javase/11/docs/specs/jni/ind... (Android supports up to Java 6 JNI)
- half-kh-hacker 8y ago> Java 9, 10, and 11 have not changed the bytecode Off the top of my head, JEP 309, implemented in Java 11, introduces a new instruction called `constantdynamic`
- kllrnohj 8y agoAh my mistake then. Is there any way to actually use that instruction from Java though? Or is this just bytecode support for a potential future feature?
- pjmlp 8y agoIt gets used by the compiler, so unless ART gets to understand it, those nice Java 11 libraries at Maven central that might make use of it are a no go on Android. And yes, it is also related to the ongoing Valhala efforts. https://openjdk.java.net/jeps/303 https://openjdk.java.net/jeps/303
- jaytaylor 8y agoJEP309 "constantdynamic" for the uninitiated: https://openjdk.java.net/jeps/309 https://openjdk.java.net/jeps/309