Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Transitioning to Java

You're reading from   Transitioning to Java Kickstart your polyglot programming journey by getting a clear understanding of Java

Arrow left icon
Product type Paperback
Published in Apr 2023
Publisher Packt
ISBN-13 9781804614013
Length 354 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Ken Fogel Ken Fogel
Author Profile Icon Ken Fogel
Ken Fogel
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Preface 1. Part 1:The Java Development Environment
2. Chapter 1: Understanding Java Distributions FREE CHAPTER 3. Chapter 2: Code, Compile, and Execute 4. Chapter 3: The Maven Build Tool 5. Part 2:Language Fundamentals
6. Chapter 4: Language Fundamentals – Data Types and Variables 7. Chapter 5: Language Fundamentals – Classes 8. Chapter 6: Methods, Interfaces, Records, and Their Relationships 9. Chapter 7: Java Syntax and Exceptions 10. Chapter 8: Arrays, Collections, Generics, Functions, and Streams 11. Chapter 9: Using Threads in Java 12. Chapter 10: Implementing Software Design Principles and Patterns in Java 13. Chapter 11: Documentation and Logging 14. Chapter 12: BigDecimal and Unit Testing 15. Part 3:GUI and Web Coding in Java
16. Chapter 13: Desktop Graphical User Interface Coding with Swing and JavaFX 17. Chapter 14: Server-Side Coding with Jakarta 18. Chapter 15: Jakarta Faces Application 19. Part 4:Packaging Java Code
20. Chapter 16: Deploying Java in Standalone Packages and Containers 21. Index 22. Other Books You May Enjoy

Which Java should you get?

All distributions of Java since Java 11, including Oracle’s distribution, are based on the OpenJDK source code. It should not matter whose distribution of Java you choose if it has passed the TCK. If you do not have a distribution you must use, then I recommend the Eclipse Adoptium version called Temurin. This version has passed the TCK. Java is a registered trademark, so the word cannot be used for distributions other than from Oracle, hence the name Temurin. If you are curious about where this name came from, I will give you a hint – it is an anagram.

You might think that the obvious choice for a Java distribution would be an Oracle-branded version. This was pretty much the case until the final release of Java 8. With this release, Oracle required companies that distributed Java as part of their commercial offerings to purchase a commercial support license for access to updates to Java. Starting with Java 11, Oracle required commercial licensees to purchase a subscription for every developer. Personal use of the Oracle-branded JDK has remained free to use, though.

This gets confusing because should you choose to use the OpenJDK distribution or any other distribution based on the OpenJDK except for Oracle’s, there are no fees required for commercial distribution. With the release of Java 17, Oracle changed its licensing again. Now called the Oracle No-Fee Terms and Conditions (NFTC), this now allows you to use Oracle’s Java for the development of software and then distribute this version of Java with your program without the need for a subscription or fee. This is only applicable to versions of Java starting at 17. Versions from 8 to 16 are still subject to the licenses.

How is Java licensed?

If you plan to use Java to develop software commercially, then how it is licensed is important to you. As already stated, the OpenJDK carries the GNU General Public License version 2, commonly referred to as the GPLv2. The GPL is widely used in open source software. At its most basic level, it requires any software that uses GPL licensed code to also be subject to the GPL. This means that any software you create must make its source code available under the same conditions. Copyright and intellectual property rights stay with the author of the work, either Oracle or you.

Java’s GPLv2 carries with it the Classpath Exception, also called the linking exception. A classpath, like an operating system path, is the location of classes and packages that the JVM and Java compiler will use. Under this exception, you do not need to supply the source code when you distribute your application. The software you write that is linked to Java does not require a GPLv2 license. It can remain proprietary and cannot be freely used like GPL software. You choose the licensing for the code that you generate.

You have been reading a chapter from
Transitioning to Java
Published in: Apr 2023
Publisher: Packt
ISBN-13: 9781804614013
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image