It was the 18th JavaOne conference, and the Java community shows no signs of slowing down. Utzschneider told the audience that Java is still the number-one development platform in the world and the number of JUGs has been increasing by 10% year-over-year.

The Future of Java

Ramani discussed the current state of Java and how there are several different SDKs for Java: Java SE 7, CDC 1.1 (based on SE 1.4.2), CLDC (based on SE 1.3) and Java ME, just to name a few. In the past, these implementations served their specific vertical markets very well, but each implementation has diverged and become more and more siloed over the years. With Java 8, there will be a compact profile that replaces CDC.

The APIs between ME and SE will be similar, and the language will support all features in both. Java 8 will bring platform unification: code portability, commonality of APIs, common tooling - from SE embedded to server-side development with Java EE. In the future, there will just be one type of Java developer.

Other cornerstones in platform strategy include: synchronizing releases (Java 8 Early Access is available now) and working with partners (ARM, Freescale, Qualcomm) to make Java a first-class citizen in chipsets. In August, Oracle launched Java Platform Integrator Program to easily port and extend Java Embedded.

Java EE 7 shipped last summer, which is a big milestone considering that it's been talked about at the last two JavaOne conferences. Purdy mentioned three areas have been emphasized in EE 7: developer productivity, meeting enterprise demands and HTML5.

Two years ago, when Java EE 7 was announced, the major theme was cloud. Now EE 7 has many ease-of-use features for cloud deployments, including security enhancements, default resources, schema generation, a client API for RESTful services and JSF skinning for multi-tenant applications. Lastly, Cameron announced Project Avatar is now open source. Avatar is similar to Node.js, but runs on the JVM.

Java 8 Is Revolutionary, Java Is Back

The big talk of the conference was Java 8, exemplified by Mark Reinhold in his Technical Keynote. Java 8 contains many new features, including a new Date and Time API ( JSR 310), Nashorn JavaScript Engine, Type Annotations ( JSR 308), Compact Profiles and Project Lambda (JSR 335).

Lambda is the single largest upgrade to the programming model. Ever. It's larger even than Generics. It's the first time since the beginning of Java that we've done a carefully coordinated co-evolution of the virtual machine, the language and the libraries, all together. Yet the result still feels like Java. -- Mark Reinhold

Brian Goetz, Java Language Architect at Oracle, went on to show how lambdas can remove a lot of the boilerplate just to represent simple ideas. Before lambdas, developers often used a poor "beef to bun ratio" to express ideas, often with inner classes. Goetz showed the following example:

Not only are lambdas a nicer syntax, they uses invokedynamic to result in more compact bytecode that is more performant. As proof that the language and its APIs have improved, Goetz talked about the new stream API and how you can use it to do bulk operations on collections. For example:

This provides syntax, performance and abstraction, and you also get parallelism. Java 7 added a new Fork/Join framework for decomposition, but its API still made it hard. With Java 8, you merely have to make a one-line change, changing stream() to parallelStream():

NetBeans 7.4

John Ceccarelli, NetBeans Engineering Director, gave a Chess Game demo of editing an HTML5 application (written in Knockout.js). He demonstrated how it was possible to tweak properties in NetBeans (similar to how you'd do it in Firebug or Chrome Developer Tools) and have those instantly be reflected in your browser without reloading. It looks very similar to IntelliJ IDEA's LiveEdit plugin.

Last year, NetBeans introduced Project Easel, which was designed to add advanced HTML5 support to NetBeans. Ceccarelli mentioned the community's reaction was "Hey, that's great, but we want it in our EE projects." The good news is NetBeans 7.4 RC1 was released right before JavaOne, and it includes support for HTML5, Java EE, Java Web and Maven Web projects.

In addition to live editing of HTML and CSS, NetBeans 7.4 includes JavaScript framework support for Angular, jQuery and Knockout.js. This means the code editor is aware of all your DOM ids, as well as model names in your JavaScript. NetBeans 7.4 is all about mobile web and mobile hybrid (via Cordova 3.0 support). It's interesting how its live edit feature can be used on mobile devices in addition to desktop browsers. The latest release candidate can be downloaded from netbeans.org.

The Chess Server for the aforementioned demo was written using Java EE 7 and deployed on GlassFish 4. The application has five distinct modules: Chess Endpoint, Player Registration, Chess Engine, Chess Game Manager and Persistence Manager.

The Chess Server uses many new Java EE technologies, including: WebSockets, Batch, EJB, JPA, JAX-RS 2.0. All the communication between the client and the server is done via JSON. Santiago Pericas-Geertsen, a member of the GlassFish team, showed some code illustrating how easy it is to setup a WebSocket endpoint with Java EE 7:

The client API to talk to this endpoint is pretty similar and looks easy to implement.

The final technical innovation on display in Oracle's Technical Keynote was the DukePad. The DukePad, is a do-it-yourself, make-at-home tablet computer based on the Raspberry Pi and JavaSE 8 Embedded. They found that CPU performance isn't great: the Raspberry Pi CPU is almost as fast as a Pentium II, 14 times slower than a Samsung Galaxy S4 and 94-100 times slower than an Intel Core i7 processor. However, the GPU is pretty good, 400 times faster than the Pentium II had in 1996.

OpenJFX has had most of its components open sourced, including iOS and Android prototypes. The presenters mentioned its forums are healthy and they've received a lot of bug reports from users. They've also received a fair amount of community contributions. JavaFX is included in JavaSE 8.

For Java 9 and beyond, Oracle has a number of initiatives. The main ones are Java on GPUs, Reification (getting rid of erasure in Generics), JNI 2.0, Memory-Efficient Data Structures and building a modular platform with Jigsaw.

The Java Community

The Java Community Keynote was kicked off by Donald Smith, Senior Director of Product Management at Oracle. He brought many different folks on stage to talk about inspiring end user cases of Java technology.

Tori Wieldt, talked about the Raspberry Pi Challenge and how there were 25 developers who participated and seven projects completed. Heart of Glass (monitoring heart rate in real time with Google Glass) and MTAAS (Monster Truck as a Service) were two of the successful projects that emerged from this event. It was also announced that Oracle has signed an OEM agreement with the Raspberry Pi Foundation. They're going to start including Java SE with some of their images, so Java will be included out-of-the-box!

Other notable announcements in the community keynote include: Square has become a member of OpenJDK and Devoxx4Kids is looking for JUG leaders and parents to host workshops in their own cities. Of course, Aditya Gupta's demo of how to be a Minecraft hacker was one of the highlights. It was also one of the first Eclipse demos used in keynote presentations. He made pigs fly and explosions create more explosions, learning most of it with help from his dad, Arun Gupta, and Minecraft Forge.

Oracle Academy got a mention from Alison Derbenwick Miller. It offers curriculums for K-12 students, as well as universities. It educated 2.5 million students last year and offers student workshops, teacher development and discounts on certifications.

Following the education portion of the community keynote, many robot demos were on display. James Gosling even made a guest appearance to talk about the work he's doing.

Proof That Java Is Back

The strategy and technical keynotes were instrumental in explaining why Java is back. Java 8 hopes make it fun to program in Java again (by reducing boilerplate code) and there are lots of APIs in Java EE 7 that should make it easy to build modern applications. There's further proof in some recent articles:

If you didn't get a chance to attend JavaOne this year, you might want to add it to your calendar for next year. If not for the technical content, do it for the networking. The Oracle Appreciate Event was off the hook with free food, beer and music from Maroon 5 and the Black Keys. The parties are back, and the exhibition hall was overflowing.

More than anything, the enthusiasm of the developer community seems to be as strong as ever.

About the Author

Matt Raible has been building web applications for most of his adult life. He started tinkering with the web before Netscape 1.0 was even released. For over 15 years, Matt has helped companies adopt open source technologies (Spring, Hibernate, Apache, Struts, Grails, Bootstrap, jQuery) and use them effectively. Matt authored Spring Live and Pro JSP. He is also the founder of AppFuse, a project which allows you to get started quickly with Java frameworks, as well as a committer on the Apache Roller and Apache Struts projects.He knows and Loves: HTML5, CSS, JavaScript, CoffeeScript, jQuery, AngularJS, Java, Spring, Scala, Play! Framework, Groovy, Grails, Tomcat, Jetty and PhoneGap.

It looks like Java is releasing a trimmed down set of the features that were released with .NET 3.5 back in 2007. Lambdas are neat, but kind of hoaky without extensions methods. Ie, just imagine if instead of

I actually prefer the Java way of doing this - making the type switch explicit is just easier to read in my option. And given the amount of time and effort that went into consulting Java devs on the approach I suspect most Java devs will also prefer it.

In general Java tends to favour readability over terseness where there is a tension between the two, and I think that's why I tend to prefer it as a language to C# even though they are to all intents and purposes the same language.

Each to their own though - Scala uses the C# like syntax if you prefer this.

Actually, my experience in real-world C#.NET projects says otherwise. Even though the latest version of C# is available, .NET developers keep using regular "for" loops most of the time. They avoid lambdas, except when writing LINQ expressions. And even then, LINQ is mostly underused; more complex expressions are avoided in favor of creating stored procedures/functions in T-SQL. (And, no, I am not talking about some small company developing trivial apps - this is in large codebases developed by dozens of programmers in long term projects.)

This leads me to believe that the same will happen in Java 8-based projects. Most developers, most of the time, will stick to the old idioms and rarely use lambdas, regardless of their actual usefulness. Personally, given the choice I use them whenever possible, but that's just me...

I agree that the actual use of lambdas will be limited in Java. Lambdas will be mostly used for mapping, filtering, aggregating collections or writing event handlers.

For most current programmers, 'OO-ness' is ingrained and its hard to unwind that.

I think its better to just adopt languages like F# or Scala that offer OO but are first-class functional languages as well. These will force the needed mindset change.

There are trending programming models such as Async, Actor and Reactive that are and will become increasingly relevant and which are very reliant on lambdas and other functional programming idioms such as monads. Java will require major language surgery to support these concepts well. F# already has all of them and so does Scala, I believe. Note that functional languages are much easier to extend and hence offer a better base for new features that will be required in future. Note also that C# has already undergone major changes in the language spec to support LINQ, lambdas and now Async.

I welcome lambdas in Java but calling it 'revolutionary' is a bit much.

On a side note, although date/time handling will be improved in Java8, amazingly there is still no good way to handle currency in Java (something I have blogged about in the past). Doubles (and all floating point numbers) are inherently unsuitable for money, or anywhere exact calculations are required. Using int or long requires keeping track of decimal points, and BigDecimal isn’t ideal either.Those guys may improve things, but it looks like we will have to wait until Java 9 for that :-)

Is your profile up-to-date? Please take a moment to review and update.

Email Address

Note: If updating/changing your email, a validation request will be sent

Company name:

Keep current company name

Update Company name to:

Company role:

Keep current company role

Update company role to:

Company size:

Keep current company Size

Update company size to:

Country/Zone:

Keep current country/zone

Update country/zone to:

State/Province/Region:

Keep current state/province/region

Update state/province/region to:

Subscribe to our newsletter?

Subscribe to our architect newsletter?

Subscribe to our industry email notices?

You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.