News for hackers. Stuff that matters.
Re:Retropiler: Java 8 Standard Library Backport for Android by jsiepkes on Sunday May 07, 2017 @12:48PM (#14286271)
Since Android N the Java implementation is actually OpenJDK so I guess this is primarily useful to support older Android versions.
Re:Retropiler: Java 8 Standard Library Backport for Android by pjmlp on Sunday May 07, 2017 @01:10PM (#14286363)
This 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.

Re:Retropiler: Java 8 Standard Library Backport for Android by jsiepkes on Sunday May 07, 2017 @02:14PM (#14286673)
I 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.

Re:Retropiler: Java 8 Standard Library Backport for Android by pjmlp on Sunday May 07, 2017 @03:29PM (#14287123)
Not 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.

Re:Retropiler: Java 8 Standard Library Backport for Android by bitmapbrother on Monday May 08, 2017 @12:16AM (#14289205)
I'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.
Re:Retropiler: Java 8 Standard Library Backport for Android by pjmlp on Monday May 08, 2017 @02:12AM (#14289598)
Because 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 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.

Re:Retropiler: Java 8 Standard Library Backport for Android by bitmapbrother on Monday May 08, 2017 @03:24AM (#14289863)
>Because Google has broken Java portability

Android was never intended to be used for Java portability so nothing has been broken.

>I cannot just take a random Java library and have it work on Android.

Android is not compatible with Java so why would you expect a random Java library, meant to work with Java, to work on Android?

>Thanks to Google now I need to search for Android Java libraries, instead of Java libraries.

A comprehensive list of libraries that work with Android has already been created so why would you need to look for Java libraries?

>Funny every time I search for Java on https://developer.android.com/develop/index.html I get several hundred results, and yet Google doesn't call their fork Java, go figure.

The Android SDK is a fork of the JDK. Did you expect them to rename every instance of the word "Java" to something else just for the sake of differentiation?

>What I care is that now I need to write two libraries instead of one.

I'm sure there are a plenty of libraries that work on either platform, but such is the nature of a fork. Support the platform you care about.

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

Google doesn't use the Oracle JDK they use the OpenJDK so why is a commercial license needed to use a forked version of an open source project?

Re:Retropiler: Java 8 Standard Library Backport for Android by pjmlp on Monday May 08, 2017 @04:11AM (#14290001)
Are there still open positions at the Android team?
Re:Retropiler: Java 8 Standard Library Backport for Android by Filligree on Sunday May 07, 2017 @01:07PM (#14286350)
It doesn't use Dalvik anymore?
Re:Retropiler: Java 8 Standard Library Backport for Android by asmosoinio on Sunday May 07, 2017 @02:54PM (#14286918)
Not 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)

Re:Retropiler: Java 8 Standard Library Backport for Android by jsiepkes on Sunday May 07, 2017 @02:24PM (#14286734)
Dalvik 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)

Re:Retropiler: Java 8 Standard Library Backport for Android by dragonwriter on Sunday May 07, 2017 @02:34PM (#14286799)
They did change runtimes from Dalvik to ART, from Android L on.
Re:Retropiler: Java 8 Standard Library Backport for Android by lloeki on Sunday May 07, 2017 @01:32PM (#14286472)
"Java is four things." - jwz

https://www.jwz.org/doc/java.html

Re:Retropiler: Java 8 Standard Library Backport for Android by cwyers on Sunday May 07, 2017 @02:10PM (#14286652)
Oh 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.
Re:Retropiler: Java 8 Standard Library Backport for Android by jlg23 on Sunday May 07, 2017 @05:07PM (#14287680)
> the person [..] that hasn't in fact grown up yet.

One of the greatest accomplishments an adult can achieve.

Re:Retropiler: Java 8 Standard Library Backport for Android by twic on Sunday May 07, 2017 @02:51PM (#14286900)
Could be! I still laugh every time i see that wrinkly breakfast, though.
Re:Retropiler: Java 8 Standard Library Backport for Android by bitmapbrother on Sunday May 07, 2017 @02:55PM (#14286924)
The Dalvik runtime was replaced with ART in Android 5.