You are currently browsing the category archive for the ‘Java 7’ category.

Hi All, (this post is x-posted from Martijn’s personal blog and the java7developer blog)

Recently I’ve received a bunch of private correspondence from people confused/worried over the change in the default Java packaging for Linux. For many Linux distributions, the official Sun/Oracle version of Java has been packaged up as the default Java for the platform. However, due to a recent licensing change, this will no longer be the case! So, is this a positive or a negative thing for the Java and open source ecosystem? Read on for my take on it 🙂 

Background

Dalibor Topic announced that With Java SE 7 and JDK 7 being released, and with OpenJDK as the official Java SE 7 reference implementation, that it was finally time to retire the non open source “Operating System Distributor License for Java” (DLJ).

What does it mean for me?

The knock on effect of this is that Linux distributions will on longer package Oracle’s Java (== OpenJDK wrapped up in some proprietary bits and pieces) as the default Java. This can/will cause problems for some Java users initially as there are a smattering of bugs (especially in the Swing UI libs) still left in the OpenJDK that affect programs like PCGen. However, some Linux distributions had already taken this path some years ago, most notably Ubuntu and the last remaining bugs are being cleaned up pretty quickly.

Positive or Negative?

Overall, I think this is a positive step in the right direction for free and open Java on Linux platforms. This sentiment was welcomed by well known open source advocate Simon Phipps in a twitter post. The fact the the OpenJDK is now the reference implementation (combined with efforts to open up the issue tracker for the OpenJDK) means that means that a vast host of Java/Linux end users can now directly improve ‘official Java’ for all of us.

I want the Oracle version!
Linux users who need to use the proprietary parts of the Oracle JDK 6 or Oracle JDK 7 binaries can of course as usual simply get the gratis download at http://oracle.com/java under the same terms as users on other platforms. However, if it is due to a ‘bug’ that is discovered I strongly encourage those users to submit a bug report to the OpenJDK project, so that any issues can be fixed for all of us.

Opinions and further comment is welcome!

Advertisements

It may comes as a bit of a surprise given all of the publicity around Java 7, but the final version of Java 7 still hasn’t been approved yet.

Java 7 actually comprises 4 separate JSRs – 1 master JSR and 3 specific ones. They are all up for their Final Approval Ballot, which is due by the 18th July.

JSR 203 NIO.2 – New I/O v2
JSR 292 Supporting Dynamically Typed Languages on the Java Platform
JSR 334 Small Enhancements to the Java Programming Language

and the big one:

JSR 336 Java SE 7 Release Contents

The reason behind the strange-seeming delay in final ratification is that Java is a bit different to other popular programming communities. For example, the .NET community is run by just 1 company – Microsoft – and the development community and other corporate partners have no formal say in how the community is run. If MSFT decides to change the entire development landscape with their next release, then they can. There was all sorts of gnashing of teeth in the developer community when Silverlight was effectively demoted as part of MSFT’s new roadmap.

On the other hand, in some of the open source communities, such as Python or Perl or Ruby, things can be a bit more badly defined. Some communities are more formal than others, but in many cases there is a small group of community members who contribute “most” (in some loosely defined sense) who are responsible for driving change forward in releases. If corporations are contributing a lot to a particular community, then their representatives in the community will generally be well regarded and listened to.

In good open-source communities, this tends to lead to releases which reflect the overall consensus view of the community. However, large communities are not monolithic, and it’s important to remember that you can’t please all of the people all of the time.

The Java world is a little different. Java was always intended to represent a concert of interests – originally very corporate focused, but bringing in prominent individuals and communities as the Java ecosystem has grown. At the heart of this is the Java Community Process (JCP), which is presided over by the Executive Committees (there’s one for SE/EE and one for ME). It is this Executive Committee that the LJC was recently elected to.

The ECs are responsible for approving every official Java standard (which are all expressed as JSRs). This happens by a vote. This a simple process – Yes, Yes with comments, Abstain, No and Fail To Vote are the options, and the results are binding – if 50% or more vote Yes, the JSR passes and becomes an official standard.

This process means that the final votes have to be scheduled against a moving target. The final version of the language specification, and the reference implementation (which for Java SE is OpenJDK) are formal documents. So it isn’t really possible to have a final vote on them until the release is basically ready – because otherwise EC members can’t be certain what they’re voting on.

The final vote being so close to the release date is an artifact of the JCP being a mostly open standards process.

The reason that it can be described as “mostly open” is because it has been, at times, a little bureaucratic. It was born in an era when corporate interests were the only type that were really considered. Open source hadn’t taken off yet. The strong, vibrant technical communities we see didn’t really exist. Even the Internet wasn’t anything like today’s version.

Part of the work that the LJC are currently engaged in on the Executive Committee is a reform of the JCP, to make it faster, more streamlined, and fundamentally more transparent and easier for the ordinary developer to participate in. There’s a new JSR – JSR 348 – which is a first step to reforming the JCP. There will be at least 2 or 3 more needed to get the process fully reformed, but we feel that taking some small, (hopefully) easy steps first is the right way to get some momentum going.

Finally, if you’re interested in the JCP, or in standards work, or in the future direction of the platform – please get in touch. The JCP group within the LJC is always looking for people who are interested, in the views of our members and in the overall thoughts and direction of our community. We try to spend as much time as we can canvassing your opinions, but if you have strong feelings about anything – then let us know. Start a thread on the mailing list, or come and talk to us if you’d rather talk privately. We’re always happy to hear from you, and by doing so, we can ensure that we’re representing you as well as we can.

Thursday the 7th of July saw one of the largest milestones in Java’s recent history, the much anticipated launch of Java 7. My initial reaction was it didn’t seem that long since Java 6 was launched, however it was almost 5 years ago, the technical equivalent of when dinosaurs still roamed the Earth.

I think it would be naive to assume that nothing has happened during the reign of Java 6, in fact it’s quite the opposite. The first step towards a better Java was the open sourcing of the JDK, giving developers the opportunity to fix and work directly on the platform. Although I don’t have a direct quote, at the LJC Open Conference in November 2010 it was stated that between the first version of Java 6 and the latest there was a performance gain of over 50%. In Java 6.14 we saw the introduction of the G1 Garbage Collector, another revolutionary change to the options that developers have in terms of tuning and performance. Politically Java has changed hands and governance, passing from Sun to Oracle, and people have their opinions on what this means for Java.

Up until Thursday I was very skeptical about where Oracle might go with Java and how that would change the language I have built my career on. Which brings me to the launch day itself, this began with a webcast held across the world by Oracle. If you missed the webcast you can view it here. We got to hear from some of the senior developers on the Java project, and also from community speakers from all corners of the globe. For the London Java Community, it was an absolute honor and pleasure to see a small group of users that has now risen to almost 1800 members, represented by Ben Evans. I really enjoyed the webcast and thank Adrian Woodhead at lastfm for their hospitality in hosting the webcast for other members of the LJC. That gesture of sharing is something that was also not far from the content of Oracle’s talk, as many people appreciate one of the biggest successes of Java is us – The Community. The value of this has certainly not been underestimated by Oracle and this was evident from the content of the webcast. So what do I think the main themes were to take away from the talk and the event?

  • Java 7 is an evolutionary release not an revolutionary release – Mark Reinhold stated that one of the best things about Java 7 is the fact it is shipping.
  • Increase in stability
  • Increase in performance
  • Increase in maintainability
  • …Although not said explicitly, the feel of the community is Java 8 is definitely not as far away as the gap was from 6 to 7.

For the event there was then kind hospitality at the Oracle offices, with people from across the community together with a definite buzz and excitement in the room about Java once more.

What is new in Java 7? This could be an entire post/book in itself and each individual improvement could be gone into in great detail. I’ll attempt to pick out a few key points below and give links for more information. I’d also recommend reading Mark Reinhold’s blog. The best summary of the below I have read so far is in Java 7 developer MEAP, by Ben Evans and Martijn Verburg.

  • JSR 292 Invoke Dynamic
    • This is one of the major steps that we are seeing towards a change in the way that we view Java. What even is Java? I think we are seeing a separation of Java the language and the Java Virtual Machine. Strictly speaking, it’s not really the Java VM now, but just the VM. Highlighted by the gentleman in the video wearing a Python jacket over a Java T-Shirt, the VM is now home to many dynamic languages. Invoke Dynamic is another step towards the multi-language support for the JVM. Simply put it supports the invocation of allows a non-Java call to be made and for the linkage to be determined at runtime… OK that wasn’t so simple, but you can read more about the project here.
  • JSR 334 Project Coin
    • Project coin are all about small changes to the Java language to make life easier for daily use of the Java programming language. A few of my personal favorites are:
      • Ability to switch on String! Finally, it’s only taken 15 years.
      • Diamond Operator, no longer do you need to declare the generic expression on the right hand side if they are present on the left:
        • Old Way: List<String> myFingersAlreadyHurt = new ArrayList<String>();
        • New Way: List<String> jsr334SavedMyFingers = new ArrayList<>();
      • try-with-resources – lets get rid of some boiler plate code
    • You can find the full list here.
  • Better Unicode Support
    • Not too excited about this because it’s not a problem I run into. However, from speaking to a few people about this at the event – this was going to save them a lot of hassle.
  • JSR 203: NIO.2 and File System
    • Finally, we have a decent API for interacting with Files and a scalable approach to asynchronous I/O.
    • I’m not an expert on the rest of this JSR yet, so might be worth having a read here if you want to know more.
  • JSR 166y Fork Join Framework
    • Doug Lea and his concurrency experts have created the Fork Join Framework. This allows for concurrent tasks that involve splitting a larger programmatic problem into smaller blocks of computation i.e. Merge Sort a nice framework in which to operate. The ForkJoinPool uses workers to perform the tasks placed upon it, which are also capable of stealing tasks from other workers if they are no longer busy.

I think the next few months in the Java community will be exciting ones, with July being very much the month of Cloud and is Java the right language for the cloud? For those in London that haven’t been along to a Java event yet, please come along and join us on meetup.com and join us at our developer pub session to get involved in the discussion.

James Gough

What is the LJC

The London Java Community (LJC) is a group of Java Enthusiasts who are interested in benefiting from shared knowledge in the industry. Through our forum and regular meetings you can keep in touch with the latest industry developments, learn new Java (& other JVM) technologies, meet other developers, discuss technical/non technical issues and network further throughout the Java Community.

Twitterfeed

Advertisements