14
January
2015

What Version of Java – Java 8... Please?

If you are building Java software, particularly if you want to share it with others, what version of Java should you use?  Java 8 has new features that would improve your development, but don't forget to consider your audience.

Considerations for Developers

Java 8 is a great leap in features for developers in the Java space:

  • Lambda Expressions
  • Parallel Processing
  • Default Methods
java8 distributing libraries and code to Users

to name just a few core changes.  Some great articles about feature are:

http://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html

https://blog.idrsolutions.com/2015/03/java-8-repeating-annotation-explained-in-5-minutes/

You should write Java by default in Java 8 because you'll be more productive (less code), more modern and more interested.   The Java 8 code you write will be topical and can be used as a resource to teach others.  So why wouldn't you?

Considerations for Your Audience

You need to consider the audience for the code you are writing. Is the audience just you, the Java 8 interested community, an internal company project or is it something to share with the world?  It's logical to pick Java 8 if you are teaching others specifically about Java, or if it's a project for yourself.  However, in a distribution or company environment it's often more restrictive.  

If you are developing a program for internal use in a company then the constraints are already set by the corporate environment.  If the project is a "green fields" project where you can set the bar, Java 8 is likely to be ideal - what a lucky programmer you are.   Often however, in a corporate environment, Java 8 is simply not an option yet because the benefits of upgrading are often out-weighed by cost and risk factors.


If you are developing a program to distribute to home-users, then perhaps you can use Java 8 and assume the users either have it or can simply update to it.  Java is free and the home-user will probablyassume a Java 8 update is ok to do.  After all the user is probably being prompted to update their Java fairly often anyway.

For example, if the massively popular Java game Minecraft has a similar audience to your program, then their approach is relevant . The current Minecraft system requirements are a minimum of Java 6 and a recommendation of Java 7.  This means they are not taking advantage of Java 8 in their development environment; the reasons will include a consideration of the market and consideration of cost/benefit evolving their code base. mcraft1

If you are developing a program to distribute to businesses, you can be sure that they will move slower than the home market in terms of Java updates.  It's not a quick decision to update to Java - there's:

  • compliance and testing,
  • compatibility and
  • typically a lot of computers to update.  

This unfortunately means that distribute-to-business Java programs will not have a large Java 8 audience yet, except in technology or application niches.

What Docmosis Does

Docmosis software is compatible with Java 8, though like so many systems this is because Java has been so good at future compatibility - your Java 1.4 compiled program will still run on Java 8.  The Docmosis core is for integration into business applications, so we have a Java 1.4 core code-base and release it compiled with Java 1.4.  This gives us the broadest audience for our core engine.  

Luckily, we DO get to develop with newer versions of Java (so our dev team is still happy).  We have cloud - based technologies which, by virtue of the cloud being new, allow us to set Java 6 as a reasonable baseline.

Tags : Java Author : Paul Jowett