New to Java? Some Resources

In this tweet, I was asked if I had a list of resources for developers who are new to Java. I didn’t at the time, but I’ve spent some time researching and here is that list.

I’ve listed content that is both free and paid. It’s not that one type is superior; it’s just to give you plenty of choices. These are the resources that I’ve used and do still use to re-learn Java. So, if you’re new to Java or looking to pick it up again after a break, this blog is for you.

The other super important point is that everyone learns differently; some like reading, some like doing, some like watching, most of us like a bit of a mix of everything. I tend to switch between them depending on what I want to learn about and how I feel. You’re probably similar, so pick an approach that works for you.

Learning Platforms

Let’s start with learning platforms. There are plenty of them to choose from, so you can pick one that works for your learning and budget style.

JetBrains Academy is a reasonably new learning platform that I’ve been using to skill back up on Java. I’ve used it in conjunction with other learning materials. I like the mix of theory with practice tasks. Of course, the slick integration with IntelliJ IDEA is a bonus too.

I’ve also used Udemy in my Java learning travels. There is a wealth of content available here, and you can sample most of it before you buy.

Finally, I’ve played around with codewars. This is a nice gentle introduction to katas (more on them soon), irrespective of where you are on your coding journey. It’s less structured than either JetBrains Academy or Udemy and can provide some light coding respite when the mood takes you.

Communities

The Java community is a rich, vibrant and welcoming place. This is played out in the communities that have sprung up around it.

The Virtual JUG is what it sounds like; a virtual Java User Group that hosts talks and shares knowledge. They have a Slack and Meetup space, so you can hear great speakers, speak yourself and learn from your peers.

Since I’m based in the UK I also want to give a shout out to the London Java Community and the Manchester Java Community. They are both great resources of information and supportive communities. I fully expect that this is mirrored in other Java User Groups worldwide, so I recommend you find your nearest one (or set one up(!)) and get involved. Talking of getting involved, creating content is an excellent way to do that.

The Java Specialists is another active group run by @heinzkabutz. Heinz also has a newsletter that I recommend you take a look at.

The Code Ranch is a very friendly place for newcomers to Java where you can post questions, learn from others and try out coding questions. The forum is also really active (oh, and did I mention that everyone here is super lovely?).

Code Katas

I am a relative newcomer to code katas, but I really like them as a way of learning. They are self-contained mini-puzzles that you can solve at your leisure.

@TheDonRaab does a great job of keeping these updated for Eclipse Collections: https://github.com/eclipse/eclipse-collections-kata

@CGuntur has also created these Java Katas for you with really nice instructions and updates: https://github.com/c-guntur/java-katas

I’ve not started these yet, but I like the look of them because the tests are right there to look at.

Specific Java Resources (including Frameworks)

This is a bit of a catch-all section, but there are a few resources that I’ve come across that are amazingly useful; they are listed here.

This course from @techgirl1908 was one of the very first resources I used on my journey to familiarise myself with the last 20 years of Java. I found it to be well-paced, gentle and incredibly useful.

@marcobehler has created a lot of content around Java, and specifically, Spring. This blog, and this Spring course, it is a bit like an onion. It starts with life before Spring and builds up the complexities so that you feel like a wizard when using Spring (and subsequently Spring Boot) and understand how the magic is being done and why. I feel like there’s a spring onion pun there, but I’ll move swiftly on.

There is a wealth of Java information on the Baeldung site. I don’t have one specific blog to point to, but invariably when I’ve Googled Java something there is a blog on this site that explains how to do it. It always amazes me just how rich this content is in terms of quantity and quality (many authors contribute to it).

One more thing I do want to mention is the official Oracle documentation for Java. I say this because you don’t have to store the Java language in your head. There is no shame in looking stuff up (another reason why technical interviews are so broken). Spend your time on the artistic side of learning to code, not remembering stuff that is one Google search away. Sure, you’ll learn more in time, but it doesn’t need to be your priority when you are starting your Java journey.

Of course, there are plenty of dedicated Java blogs out there, which you can find with a quick Google, but I want to keep this list of resources specifically targeted at content that newcomers might find helpful and that I’ve used.

Books

I like books; arguably, I like them more than videos. As with all other resources I’ve listed here, there is no shortage of them. These are the ones that I specifically have found helpful.

Head First Java by Kathy Sierra and Bert Bates. Yes, this book is old on the scale of Java, but it’s still very, very good and will probably appeal to your brain’s way of learning. I started with this book, and I didn’t regret it.

97 Things Every Java Programmer Should Know. Am I including this because I work with @trisha_gee, no, I am including this because I got a lot of value from it. I liked the vast range of topics that I could dip in and out of it very quickly because all the content is standalone. Many very experienced Java professionals contributed to this, so in my mind, they are worth listening to!

Effective Java by Joshua Bloch this isn’t the book that you start with, but it’s a book with a relatively low barrier to entry, and a book that I got a lot of value from (and probably need to re-read now I have more knowledge).

Head First Design Patterns 2nd Edition. This book is so fresh off the printing line that the ink is likely still wet. I’m going to come clean and say that I don’t own this yet, but I plan to own it very soon. I do own the first edition, and it was excellent. I fully expect the second edition to be just as good, if not better. Design pattern knowledge and understanding will serve you well, no matter what your coding goals are.

Java Certification

A note about Java Oracle Certification: this tends to be one of those subjects that can polarise opinion. I think certification is very valuable for a deep understanding of the Java language, and it will serve you well if you want to study and obtain it. I don’t think you need to be certified as such, and I suspect that on the job knowledge of Java will provide you with an equally rich and diverse experience of the language, albeit from a different angle. It’s entirely up to you, but here are my recommendations for resources if you want to pursue Java certification.

There are excellent books available from Jeanne Boyarsky and Scott Selikoff. I haven’t taken the exam, but I have found the books very useful and the examples informative.

My colleague Mala Gupta is also a passionate advocate of Java Certifications and her book for Java SE 11 is in preview so that you can get your eyes on it already!

Goals, Learning Styles and Time

Irrespective of if you’re new to coding, new to Java specifically, or took a break from Java, this is a list of resources that will help you get up and running quickly. I suggest you find the ones that work for you and build your list. Invariably what works for one person might not work for the next, so feel free to explore the wealth of content out there. Your learning style will also play a part, as will the amount of time you have available.

Whatever you do, enjoy the journey and remember what your goals are. Never lose sight of the why; that’s what will get you to where you want to be.

The Java SE Ecosystem

The Java SE ecosystem is strewn with acronyms that it has picked up over the last 25 years. Sometimes those acronyms even mean multiple things. Sometimes there are acronyms within acronyms! This post attempts to explain them all in terms of two main groupings:

  • OpenJDK

  • Java Development Kits (JDKs)

What is ‘OpenJDK’?

The phrase OpenJDK is used to describe at least three fundamental things in the Java ecosystem. I’ve expanded the links here so you can see what I’m talking about.

First

First, there is a place called OpenJDK which lives at https://openjdk.java.net and is also known to some as The OpenJDK Project. This is where people collaborate on an open-source implementation of the Java specifications, https://www.oracle.com/java/technologies/java-se-glance.html, which are released every 6 months. Sun Microsystems open-sourced the majority of Java in 2006 under the GNU General Public License (GNU GPL) version 2 with a linking exception. OpenJDK serves as a continuation of that change. This is the use that I will refer to througout this blog. When I say OpenJDK I mean the place at https://openjdk.java.net unless otherwise specified.

Second

OpenJDK can also refer to just the source code repository on GitHub available at https://github.com/openjdk. This is the reference implementation of the Java specifications that I mentioned above. Many vendors use the term OpenJDK for their specific JDK binary, which is produced by building a binary off the OpenJDK code on GitHub. For example AdoptOpenJDK, which is available at https://adoptopenjdk.net.

Third

Lastly, OpenJDK can also refer to Oracle’s free JDKs which live at https://jdk.java.net. These are version specific binaries built from the source code which is available on GitHub at https://github.com/openjdk. Oracle provides fixes to this JDK for 6 months (until the next release of Java).

Who contributes to OpenJDK?

There are various channels to contribute to OpenJDK. This blog from Oracle has a graphic which breaks down committers for Java 15 – those that committed code to OpenJDK. To contribute to OpenJDK, you need to use a JDK Enhancement Proposal (JEP) to start with.

Correction with thanks to Marc Maathuis: You don’t always need a JEP to contribute to the OracleJDK. Bug fixes, for example may not. Contributors need to have signed the Oracle Contributor Agreement.

What are JEPs?

JDK Enhancement Proposal (JEP) is a proposed change to OpenJDK. You can think of them as the roadmap for Java. Like all good roadmaps, there’s no commitment to inclusion or timescales. Some JEPs require changes to the Java specifications. In this instance, a corresponding Java Specification Request (JSR) is required.

What is a JSR?

A Java Specification Request (JSR) may detail potential specification changes (where present) that arise from one or more JEPs. Not all JEPs will have JSRs; if the JEP doesn’t have changes to the specifications, you don’t need a JSR. A JSR may also be a suggested new specification for Java SE that does not require a JEP, such as a new specification for an API for computer vision. JSRs are considered for inclusion in the Java specifications by the Java Community Process (JCP).

What is the JCP?

The Java Community Process (JCP) is a process to facilitate the review and ultimate inclusion of changes to the Java specifications.

What are JDKs?

Java Development Kits (JDKs) are implementations of the Java SE platform specification by different vendors and groups of people, such as the open source community. Some of them are built from the OpenJDK source code. JDKs include the Java Runtime Environment (JRE), as well as other tools that help you develop Java.

What is the Java Runtime Environment (JRE)?

The Java Runtime Environment (JRE) is a component of the JDK that is required to run Java. It used to be a separate download from the JDK, but, since Java 11, it’s now part of the JDK itself rather than a separate entity meaning you can no longer download it separately.

Are all JDKs the same?

Vendors may introduce little implementation differences such as garbage collection, branding, and utilities, but they are all implementations of the Java platform specifications. For the purpose of this blog I’ve assumed the Java SE platform.

When can you call something a JDK?

To be called a JDK officially, the binaries need to have passed a Java Compatibility Kit (JCK) for that release which is a collection of Technology Compatibility Kits (TCK) that tests each JSR to ensure that the implementation of the specification behaves as expected. Oracle’s OpenJDK we spoke about earlier has passed a JCK, for example.

What’s a Technology Compatibility Kit (TCK)?

A Technology Compatibility Kit (TCK) is a set of tests that is applicable for a JSR. There has been controversy on the license for the TCK given it’s an open source project. There is now a specific license to allow the TCK to be run against the OpenJDK source code under the GPL license.

Who makes JDKs?

There are lots of JDKs out there. They all vary in terms of license, support, branding, and implementation differences. The list includes, but is not limited to AdoptOpenJDK, OracleJDK, Oracle OpenJDK, RedHat, and IBM. It is also possible to build your own JDK too. Talking of blogs, this one from the Java Champions is excellent and helps fill in some of the gaps as to how we got here.

Summary

‘OpenJDK’ is either:

Java Development Kits:

  • A binary which is an implementation of the Java platform specification that has passed a TCK.

  • Some JDKs are free to use, some have a cost associated with them for various things such as commercial use, fixes and support.

Contributions to Java and updates:

  • Anyone can contribute to OpenJDK.

  • The JCP is used to manage updates to the Java specifications. Anyone can join the JCP.

  • JEPs are the process for including changes to OpenJDK.

  • JSRs are the standards for Java SE, which may, or may not be implemented in the JDK itself.