News for hackers. Stuff that matters.
Re:An Opinionated Guide to Modern Java Development, Part 1 by spullara on Thursday May 01, 2014 @12:55PM (#7681010)
There is a good reason that Sun didn't want this to happen and tried to stop it in court — successful against Microsoft, failed against Google. If I remember right, most everyone on here was rooting for Google to win and continue to fragment the language.
Re:An Opinionated Guide to Modern Java Development, Part 1 by icebraining on Thursday May 01, 2014 @02:15PM (#7681646)
I supported Google because the ends don't justify means. People should have the right to re-implement APIs, even if we sometimes wished they didn't.
Re:An Opinionated Guide to Modern Java Development, Part 1 by squeaky-clean on Friday May 02, 2014 @03:33AM (#7684503)
Well put. Just because it wasn't a good idea doesn't mean it should be illegal.
Re:An Opinionated Guide to Modern Java Development, Part 1 by pjmlp on Thursday May 01, 2014 @01:42PM (#7681372)
I have since repent myself.

Google did indeed managed to pull a Microsoft and now we have a forked Java implementation getting steady behind the standard Java implementations.

Even J2ME is more compatible with its big brother than Android.

KitKat has now partial support for Java 7, with libraries still missing some pieces. Dalvik and ART still don't support invokedynamic bytecode.

And since almost no one has KitKat, one cannot use try-with-resources anyway.

Re:An Opinionated Guide to Modern Java Development, Part 1 by bananas on Thursday May 01, 2014 @01:51PM (#7681457)
I wrote a lot of J2ME stuff a few years ago and you're spot on. I spent two weeks doing Java 8 bits with NetBeans which was really nice and spent the last two evenings writing my first Android app and what a complete mess it is. Plus the Android tooling is horrible to get working reliably - most problems being solved by "restart eclipse".

Late edit: perhaps Oracle should make a phone ;)

Re:An Opinionated Guide to Modern Java Development, Part 1 by EdwardDiego on Thursday May 01, 2014 @03:27PM (#7682158)
> Plus the Android tooling is horrible to get working reliably - most problems being solved by "restart eclipse"

Try Intellij IDEA / Android Studio. I find them quite reliable.

Re:An Opinionated Guide to Modern Java Development, Part 1 by pjmlp on Thursday May 01, 2014 @03:58PM (#7682348)
Intellij IDEA, yes.

Android Studio seems to still have performance issues with Gradle on Windows, specially when indexing stuff.

Re:An Opinionated Guide to Modern Java Development, Part 1 by pit on Thursday May 01, 2014 @03:59PM (#7682358)
Agreed. I prefer IntelliJ IDEA Community Edition to Android Studio because I like using the same IDE for Android and Java development.
Re:An Opinionated Guide to Modern Java Development, Part 1 by pjmlp on Thursday May 01, 2014 @02:05PM (#7681562)
> Late edit: perhaps Oracle should make a phone ;)

They did an open spec tablet with a raspberry pi tough.

https://wiki.openjdk.java.net/display/OpenJFX/DukePad

Re:An Opinionated Guide to Modern Java Development, Part 1 by bananas on Thursday May 01, 2014 @02:08PM (#7681587)
Chuck a GSM module in it and done :)
Re:An Opinionated Guide to Modern Java Development, Part 1 by dota168 on Thursday May 01, 2014 @03:46PM (#7682273)
> "restart eclipse"

Eclipse

/shudder

Re:An Opinionated Guide to Modern Java Development, Part 1 by bananas on Thursday May 01, 2014 @06:08PM (#7682971)
After this week, yep!
Re:An Opinionated Guide to Modern Java Development, Part 1 by pjmlp on Thursday May 01, 2014 @02:01PM (#7681533)
I also did some J2ME stuff back in 2003, most with Sharp and Nokia devices.

I read somewhere that some in the Android team are C converts doing their first Java gig.

Have you seen how broken are the generated Renderscript bindings? They don't have anything to do with Java conventions and feel completely out of place.

Re:An Opinionated Guide to Modern Java Development, Part 1 by bananas on Thursday May 01, 2014 @02:06PM (#7681574)
Haven't looked at render script yet. Still scratching head on the layout engine stuff and View infrastructure. It's fugly. I usually write C#+WPF and C++/Qt and HTML/Java EE and all of those are massively nicer to deal with.
Re:An Opinionated Guide to Modern Java Development, Part 1 by stusmall on Thursday May 01, 2014 @02:55PM (#7681946)
If you are two days in and still getting around how Views and layout works I wouldn't call it a mess yet. You are still pretty early into it. Its not messy its just new to you.

From my experience once you get past the initial hump of learning their basic APIs and conventions its a very easy to work with platform. Maybe I am biased because I spend a lot of time with it. I also really like the tooling. How is it acting unstable for you?

Re:An Opinionated Guide to Modern Java Development, Part 1 by zak_mc_kracken on Thursday May 01, 2014 @09:38PM (#7683719)
> Even J2ME is more compatible with its big brother than Android.

Are you serious?

J2ME is even more crippled than Android's Java (no reflection, no Swing, no AWT and stuck in Java 1.4).

J2ME has been dead for more than half a decade and we have Android to thank for that. Good riddance.

Re:An Opinionated Guide to Modern Java Development, Part 1 by spullara on Thursday May 01, 2014 @11:46PM (#7684032)
I'm not sure where you get your information about this, but J2ME 8 was released alongside Java 8:

http://www.oracle.com/technetwork/java/embedded/overview/jav...

Re:An Opinionated Guide to Modern Java Development, Part 1 by biafra on Friday May 02, 2014 @12:11PM (#7686510)
No invokedynamic though :-) https://jcp.org/en/jsr/detail?id=360

Also missing:

    Reflection
    Serialization
    Lambda expressions (JSR 335)
    JNI and application native code
    User-defined class loaders
    Full annotations support (Runtime annotations)
    Thread groups and demon threads
    Full Math APIs (with BigDecimals)
    Concurrency utilities
    Full security APIs
    Full collection APIs (Sorted collection classes) 
Source: http://docs.oracle.com/javame/config/cldc/opt-pkgs/api/cldc/...
Re:An Opinionated Guide to Modern Java Development, Part 1 by pjmlp on Friday May 02, 2014 @03:16AM (#7684458)
J2ME has been updated to Java 8 and outside the mobile world is used a lot in embedded industrial deployments.
Re:An Opinionated Guide to Modern Java Development, Part 1 by jayd16 on Thursday May 01, 2014 @02:29PM (#7681753)
Forked != out of date. Android code is still Java code. you just compile to Dalvik bytecode instead of jvm bytecode.

If you think that's wrong, fine but that lawsuit had nothing to do with bytecode.

Re:An Opinionated Guide to Modern Java Development, Part 1 by _pmf_ on Thursday May 01, 2014 @01:42PM (#7681367)
The question is what Oracle would lose by licensing real Java to Google at reasonable conditions. Mobile non-Android Java is deader than dead.
Re:An Opinionated Guide to Modern Java Development, Part 1 by pjmlp on Thursday May 01, 2014 @01:45PM (#7681394)
> Mobile non-Android Java is deader than dead.

Lots of embedded devices make use of J2ME, e.g. cars, manufacturing, electricity monitoring...

Re:An Opinionated Guide to Modern Java Development, Part 1 by thwarted on Thursday May 01, 2014 @06:34PM (#7683071)
How many of those will get Java 8 updates?
Re:An Opinionated Guide to Modern Java Development, Part 1 by beat on Thursday May 01, 2014 @02:06PM (#7681570)
The billionaires at WhatsApp beg to differ. They got very very rich from "mobile non-Android Java".
Re:An Opinionated Guide to Modern Java Development, Part 1 by hatred on Thursday May 01, 2014 @04:15PM (#7682461)
Isn't their stack based on Erlang or am I missing something ?
Re:An Opinionated Guide to Modern Java Development, Part 1 by cgh on Thursday May 01, 2014 @04:52PM (#7682620)
You're missing the client side. It runs on J2ME-powered feature phones.
Re:An Opinionated Guide to Modern Java Development, Part 1 by krzyk on Friday May 02, 2014 @02:47AM (#7684397)
And on Android (and probably iPhones). Which version was first, J2ME or smartphone one?
Re:An Opinionated Guide to Modern Java Development, Part 1 by spullara on Thursday May 01, 2014 @11:49PM (#7684040)
Oracle was offering licensing for "real Java" at around $1 per device. This was too high for Google that wanted to make it entirely free. Kind of silly, since Android hardware manufacturers pay much more than that to Microsoft in patent licenses.
Re:An Opinionated Guide to Modern Java Development, Part 1 by jsight on Friday May 02, 2014 @11:47AM (#7686378)
It's unlikely that the patent licensing situation would have been different with Java ME. It is entirely likely that it would not have been completely open source due to Sun (and ultimately Oracle) restrictions on Java ME.