Java Annotated Monthly – June 2015

This month we celebrate not only the 20th anniversary of Java, but also twenty years of PHP, and two decades of JavaScript. Was it good fortune that gave rise to the popularity of these languages today, or some combination of necessity and DNA that paved their way to success? For Java, many credit the Java platform, where the language is often seen as a convenient legacy of C++. But it is curious that these languages should have such a lasting impact, and emerge at the same point in programming history. In hindsight, we may ask ourselves what we would have done differently, twenty years ago. Today we are entering another language revival, one that will shape how we write software for some time to come. What will programming be like in the next twenty years?



The OpenJDK Revised Java Memory Model – Monica Beckwith gives us a closer look at some JMM semantics such as instruction ordering, out-of-thin-air values, volatile variables and how they will change in the next version of OpenJDK. This article describes some well documented issues and much-needed fixes for high performance code on the OpenJDK.

Java EE 8 Roadmap Update – Java EE 8 plans to be ready in 2017.


Kotlin M12 is out – Kotlin M12 introduces a new syntax for annotations and enums, revised semantics for function types, improved tooling support and much more. We’re excited to see Kotlin being used in new places every day, such as Quasar, an actor framework for writing async Java, and krust-pm, a process monitor from Paulo Suzart. You can try Kotlin right in your browser.


Play 2.4.0 “Damiya” released – Play Framework now brings us more dependency injection and even fewer excuses for low test coverage with improved support for mocking and testing your Play applications. You can learn about all of the newest features in Play 2.4, and get started developing Play applications with Markus Jura from Typesafe.


This month the Android team had a number of exciting announcements, including the Android M Developer Preview. Here are a few interesting features to explore in the latest Android SDK.

  1. Data binding – Tired of finding views by ID? You can now bind variables directly from the layout XML.
  2. Revocable Permissions – Android’s permissions model is now granular, requiring apps to be more careful.
  3. App Links – Cryptographic signing will allow developers to publish and subscribe to any links which they own.
  4. Design Support Library – API for backporting material to older devices and sharing popular components.
  5. Power saving – Exponential backoff for dormant devices, and app standby behavior changes.

The Android Tools team has published a new release of Android Studio, featuring a few long awaited additions to the Android tools family. We hope you will enjoy the upcoming NDK support!

  1. Allocation Tracking – Track object allocations on the heap down to exact thread and line number.
  2. Heap Snapshots – Capture and analyze heap dumps for detecting memory leaks.
  3. Performance – The build tools have been sped up considerably, leading to faster builds.
  4. Support annotations – Provides code analysis and debugging info for annotated members.

Building Effective Unit Tests – If you haven’t tried Android development lately, there is now excellent support for unit testing. Making yours apps testable and building effective unit tests require some effort on the developer’s part, but you will thank yourself later.

Developing for Android – Chet Hasse presents a multi-part series of articles on the basics of Android programming for Java developers, with background on plenty of topics from performance to UI. Chet also co-hosts an excellent podcast on Android development.

Android Developer Nanodegree – This course on Android development from Udacity offers hundreds of hours of content from the Android team, where students will build a series of Android projects and earn an accelerated six-month online degree. The content itself is free, while Udacity certification is supported by tuition.


Tuning Java Garbage Collection for Spark Applications – Daoyuan Wang and Jie Huang share a few strategies for analyzing GC performance on Spark, a big data processing framework running on the JVM. The Hotspot JVM, when properly configured, can offer close to bare-metal performance for Spark applications.

The Ultimate JSON Library – Josh Dreyfuss at Takipi compares the performance of four common JSON parsers. Jackson wins on large files. GSON wins on small files. Everyone wins with better benchmarks.


Java 8 Concurrency Tutorial: Atomic Variables and ConcurrentMap – Learn how to use some of the new atomic data types and ConcurrentHashMap in Java 8 to speed up concurrent code. Java has some great features for concurrency, as Benjamin Winterberg explains.

Java 8 in Anger – Our colleague Trisha Gee has an excellent presentation on writing an end-to-end application in Java 8. You’ll learn about lambdas, method references, and other library features available in the latest version of Java.

Thanks for reading, and develop with pleasure!

image description