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
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
OpenJDK Cookbook
OpenJDK Cookbook

OpenJDK Cookbook: Over 80 recipes to build and extend your very own version of Java platform using OpenJDK project

Arrow left icon
Profile Icon Kobylyanskiy Profile Icon Mironchenko
Arrow right icon
€36.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (2 Ratings)
Paperback Feb 2025 298 pages 1st Edition
eBook
€26.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Kobylyanskiy Profile Icon Mironchenko
Arrow right icon
€36.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (2 Ratings)
Paperback Feb 2025 298 pages 1st Edition
eBook
€26.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€26.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

OpenJDK Cookbook

Chapter 1. Getting Started with OpenJDK

In this chapter, we will cover the following topics:

  • Distinguishing OpenJDK from Oracle JDK
  • Installing OpenJDK on Windows
  • Configuring OpenJDK on Windows
  • Installing OpenJDK on Linux
  • Configuring OpenJDK on Linux
  • Navigating through OpenJDK groups and projects

Introduction

OpenJDK is now an official Java 7 reference implementation, and is now one for Java 8 as well. This means that the most essential projects of the Java ecosystem are now open source. This also means that OpenJDK can be installed in various ways—from building from source to installing the binary package from the package manager, if any.

Sun's effort to release an open source JDK was the beginning of the project publicly stated in 2006, during the JavaOne conference. HotSpot was released under the GPLv2 license. The complete source code of the Java Class Library (JCL) was released in May 2007 under the GPL, except for several proprietary parts with GPL-incompatible licenses.

However, some proprietary parts (from 4 to 1 percent of the total code lines, depending on the update number) were required in OpenJDK in a separate proprietary bundle in the OpenJDK 7 b53 update in April 2009.

One may think that the initial installation and configuration are quite simple and do not need some sort of detailed explanation. In many ways, that's true; but there are some difficulties along the way.

We will start by distinguishing OpenJDK from Oracle JDK. The latter is based on the former, but not entirely. Each one has its own advantages and drawbacks. The primary OpenJDK advantage is the fact that it's open source while Oracle JDK is always recommended and is ready-to-use. Besides, OpenJDK 6 is the only maintainable Java 6 realization left, after the Java 6 discontinuation.

Then we will cover the installation process for Windows and possible issues with some Windows versions. After that, we will describe some typical profiles to configure an installed instance of OpenJDK for various needs, such as a server instance and developer instance.

Then we will go in to more complicated matters, such as installing OpenJDK on various Linux systems. There are at least two common ways to do it: the distribution-recommended way that depends on the distribution itself, and another way, which is common for all Linux systems.

Linux configuration is more or less the same as that of Windows, but there are some differences that need to be covered. The differences are, mainly, related to system philosophy, namely the way it's done and then what exactly is done.

Then we will proceed to OpenJDK internal structures—in an introductory way. We will consider OpenJDK projects that are already in use, and will learn how to use instruments that we will need later. Also, we will briefly look at OpenJDK groups and find out what they are doing and how they may influence OpenJDK's further evolution.

Last but not least, you will learn how to benefit from the Adopt OpenJDK program, which is also a part of the OpenJDK community. Adopt OpenJDK is an effort to improve OpenJDK usability readiness, test new language releases, and do whatever it needs to make OpenJDK more useful and welcoming among users as well as developers.

This chapter is written with an introductory purpose, and does not cover some details that are common to Oracle Java. However, it provides a necessary basis to work with.

We will use Java 7, as it is stable and the latest Java version available. All screenshots and processes are assuming that we use Java 7, if another is not explicitly mentioned.

If you already have OpenJDK built and installed as default and you are aware of the differences between OpenJDK and Oracle JDK, as well as of the existence of Adopt OpenJDK, you may skip this chapter entirely.

Distinguishing OpenJDK from Oracle JDK

Though OpenJDK is an official reference implementation for the Java platform, certain Oracle-provided software are not open source. The most famous of them is the Java browser plugin, but there are a lot more differences than just that. This recipe will show you how to distinguish OpenJDK from Oracle JDK.

Getting ready

To follow this recipe, you will need an installed OpenJDK instance. It will be good if you have an Oracle JDK instance as well, to feel the difference. Also, we will assume that you have a Linux installation and an update-java-alternatives command installed and ready to use. To know how to install OpenJDK on various systems, see the later recipes in this chapter. To know how to switch the system Java version, if you do not have update-alternatives installed (for Fedora, Gentoo, and so on), visit the Configuring OpenJDK on Linux recipe or refer to your distribution documentation/forums.

How to do it...

Please take a look at the following procedures to know the difference between OpenJDK and Oracle JDK:

  1. We will open a terminal and type the following command:
    update-java-alternatives  --list
    
  2. We will see a full list of installed Java implementations:
    $ update-java-alternatives  --list
    java-1.6.0-openjdk-amd64 1061 /usr/lib/jvm/java-1.6.0-openjdk-amd64
    java-1.7.0-openjdk-amd64 1071 /usr/lib/jvm/java-1.7.0-openjdk-amd64
    java-6-oracle 1073 /usr/lib/jvm/java-6-oracle
    java-7-oracle 1081 /usr/lib/jvm/java-7-oracle
    java-8-oracle 1082 /usr/lib/jvm/java-8-oracle
    
  3. Let's set Oracle Java as default. We will run the following command with root access:
    update-java-alternatives  --set java-7-oracle
    

    Tip

    This command may produce errors such as "no alternatives for apt". It's OK, just ignore them.

  4. Then we will go to https://www.java.com/en/download/installed.jsp?detect=jre and check our browser plugin version. We will see the activate link (following the name of the activating entity).

    We can see from the result of our actions that the Java browser plugin has been installed.

  5. Let's try to set OpenJDK as the default Java environment (the actual instance name may differ in your case):
    update-java-alternatives  --set java-1.7.0-openjdk-amd64
    
  6. Then we will go to our browser page and refresh it. It may be necessary to restart the browser so that the changes can take effect, as shown in the following screenshot:
    How to do it...

We can see that the plugin is not from the JDK itself but from a project named IcedTea.

IcedTea is an open source project, whose goal is to replace proprietary parts of the Java ecosystem as much as possible. The plugin itself is from IcedTea-Web, an open source implementation of the Java Web Start and Java browser plugins.

In most distributions, the IcedTea plugin is installed by default. But it is necessary to keep in mind that it's an open source plugin, and definitely not a referenced one. This means that its functionality might be slightly different from the Oracle plugin. It is also possible that some features may not work.

How it works…

Oracle JDK still has some proprietary components, and the browser plugin is one example. All we need in this chapter is to see the difference between the work of OpenJDK and Oracle JDK components that are different.

Also, the huge difference between OpenJDK and Oracle JDK lies in the license. OpenJDK is open source, while Oracle JDK contains proprietary pieces, and thus it is licensed under the Oracle binary license. The fact that OpenJDK is open source provides a whole new range of benefits (and exciting discoveries) through the ability to study and modify its source code. It is also worth mentioning that more than 90 percent of Oracle JDK is based on OpenJDK source code. This means the OpenJDK quality is not compromised in any way. The browser plugin is not the only thing that is missed in OpenJDK compared to Oracle JDK.

See also

  • In Chapter 5, Building IcedTea, there is a detailed explanation of how to build IcedTea from source.

Installing OpenJDK on Windows

Windows is the most commonly used OS in the world, and many developers are using it as their primary system. Despite its popularity, Windows doesn't have such strong support by the OpenJDK development community, and installation of the product is not as easy as in Linux. This recipe will cover the steps required to install OpenJDK on Windows.

This recipe provides an easy but decentralized way to install programs, although the most recent versions provide package repositories of their own. However, on Windows, the only official way to install an up-to-date OpenJDK is to build it from source.

Getting ready

To follow this recipe, we will need an installed Windows system. Windows 7 or Windows 8 will be best, because Windows XP is already officially discontinued by Microsoft.

How to do it...

There is an official build of OpenJDK on Windows, but it exists for referential purposes only. It is official and easy to install, but it doesn't have any security updates or improvements. However, there are unofficial builds, maintained by Alex Casco. We will try to install OpenJDK in both ways:

  1. We will start with an official reference build. To get it, we need to go to https://jdk7.java.net/java-se-7-ri/ and accept the license terms. Then, download and run the installer.

    Tip

    Though the OpenJDK source code is licensed by an open license, this official build is licensed by the Oracle Binary Code license and by GPLv2. If you want to keep your OpenJDK open source, please use one licensed by GPLv2.

  2. Unpack the downloaded file in a location you prefer. Let's name it C:/OpenJDK.
  3. Open the Windows command line by navigating to Start | Run, type cmd, and click on the Run button.
  4. Run the following command:
    C:\OpenJDK\bin\java.exe -version
    

    It will output the Java version information. The output should look like this:

    openjdk version 1.7.0
    OpenJDK Runtime Environment <build 1.7.0-b146>
    OpenJDK Client VM <build 21.0-b16, mixed mode>

Congratulations! We've just installed the OpenJDK official binary.

How it works…

The reference implementation is the only available official binary build of OpenJDK. But it lacks security and is used only for reference purposes. It is a simple archive that needs to be unpacked to use it.

To bypass this unpleasantness and give Windows users an opportunity to install OpenJDK as a binary without building it from source, one of the OpenJDK contributors established a completely unofficial but very useful OpenJDK build set for various platforms.

Moreover, this binary build, unlike the official one, is open source and licensed over GPL. So we can use it even in a completely open source environment without adding any proprietary pieces that will possibly get us in trouble.

Tip

You will find an installer for Mac in those unofficial builds as well.

There's more...

Though an official reference binary is outdated, there is an unofficial project that provides OpenJDK builds from sources that are up to date.

Now we will install OpenJDK 7 from unofficial builds:

  1. Go to https://github.com/alexkasko/openjdk-unofficial-builds.
  2. Select an appropriate build for Windows and download it.
  3. Unpack it and run install.exe.
    There's more...
  4. Click on the Run button when the preceding message appears.
  5. Carefully read and accept the license and then click on Next.
  6. Select the installation path in the next window. It will point to your home directory by default, so be careful—such an installation may be available to no one but yourself.
  7. If the target directory does not exist, let the installer create it.
    There's more...
  8. Check the red highlighted checkboxes in the preceding screenshot only if you want to set this JDK as default for all users in the system, not just for you. You may uncheck the fourth box if you don't need this JDK to be default at all.
  9. Then click on the Next button and wait until the installation is finished.
  10. Then click on the Next button for the last time.
  11. Then click on Done.

See also

Although the simplest way to install OpenJDK is to unpack binaries, manually or in an automatic fashion, there is no doubt that working with the source code will give us more flexibility at all possible levels.

To know more, read the following chapters:

  • Chapter 2, Building OpenJDK 6 up to Chapter 4, Building OpenJDK 8 to learn about building OpenJDK from source
  • Chapter 6, Building IcedTea with Other VM Implementations to build OpenJDK using other VMs
  • Chapter 13, Build Automation to work with future technologies, which will be unavailable in binary form for quite some time

Configuring OpenJDK on Windows

Although the initial configuration is sufficient for most tasks, it may still be required to do some configuration. In the case of OpenJDK, this is performed by setting system variables. Here we will touch only on the case that often occurs when JDK is unpacked manually—how to set it as default.

Getting ready

To follow this recipe, we will need an OpenJDK instance installed on our Windows system. Windows 7 or Windows 8 will be best, because Windows XP is already officially discontinued by Microsoft.

How to do it...

At first, we need to install our OpenJDK implementation as the default Java instance. This is often necessary for development:

  1. In order to do so, we will go to Start | Control Panel | System | Advanced | Environment Variables | User Variables (or System Variables for system-wide configuration) and add the path to the Java executable to the PATH system variable, as shown:
    How to do it...

    Tip

    If there are other paths to other Java executables, we may need to delete them as well, but it will be better to remember them, since we may need to restore our old default Java settings.

  2. If we were installing OpenJDK from unofficial builds, there may be no need to change the PATH variable at all.
  3. To validate our newly configured variable, we will go to the Command Prompt and type the following:
    java -version
  4. The expected output is the version of our newly installed build.

How it works…

In order to set a newly installed OpenJDK instance as the default JDK, we need to change the system variable. After that change, our Java executables will be visible to the system.

There's more...

The same procedure is followed to set the CLASSPATH variable. It is not very necessary, and if you are using other libraries such as GNU classpath, you probably know about it.

Installing OpenJDK on Linux

The Linux operating system allows for many internal tweaks, as well as for changes to the system's source code. It is also known as a complicated OS, and not all distributions are user-friendly. There are many people using it, and it's open source, such as OpenJDK itself. The installation process varies between chosen distributions, and we will go through the process for the three most-used package managers, as well as through the process that will work for virtually all x86 Linux distributions.

Getting ready

To follow this recipe, you will need an installed Linux system. It will be better if it has the kernel version 2.6 or higher, though OpenJDK is reported workable on 2.4 kernels as well. Also, if you have the .deb, .rpm, or .ebuild package manager, the recommended way to install any package is to install it using those.

How to do it...

When the installation of various packages is concerned, the process is dependent on our Linux distribution.

For a Debian-based distribution:

  1. Open a terminal and type:
    apt-get install openjdk-7-jdk

    Tip

    We should have root permissions or use sudo to gain access to system files.

  2. This will trigger the installation automatically. If we get an error message, indicating that the package is not found, we should Google an appropriate name for an OpenJDK package for our distribution.

For an RPM-based distribution, we'll need to first search for the package names, because package names are varied between different distributions, as shown here:

yum search openjdk

You will see an output like this:

java-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.6.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentation
java-1.6.0-openjdk-src.x86_64 : OpenJDK Source Bundle
java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.7.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.7.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.7.0-openjdk-src.x86_64 : OpenJDK Source Bundle

You may install all of the packages that have the desired version. Then, we will run another command, using the package name we've just found:

yum install <a found package name>

This will also trigger an automatic download and installation.

If we have a Gentoo-based distribution, just type the following:

emerge openjdk-1.7

This will, depending on your distribution, unpack and install a binary package or, more probably, automatically build this package from source.

There's more...

Aside from the recommended ways, there is a generic installation procedure. It is quite simple, though it may do some damage to your operating system, so don't use it unless you really know what you're doing:

  1. This is the way to unpack the OpenJDK system and then install it yourself. To get the builds, we will refer again to the unofficial build page, https://github.com/alexkasko/openjdk-unofficial-builds.
  2. Then unpack the downloaded package into a folder and run the following command from it:
    java -jar ./install.jar
  3. A GUI installer window will appear. Read and accept the license, choose the directory, and allow OpenJDK to be created, if it does not exist, as shown:
    There's more...
  4. Check the preceding checkbox if you want to make this installation the default one. Then click on the Next button.
  5. Wait for the installation to complete, and click on Next for the last time.
  6. Then click on Done.

Configuring OpenJDK on Linux

Linux configuration profiles differ from the Windows ones, because those systems are working with resources as well as with hardware in a slightly different fashion. Here, we will briefly explain those differences and a way to overcome them. Moreover, different Linux distributions, as always, have different ways to deal with the configuration. We will try to pass through the most noticeable ones.

Getting ready

To follow this recipe, you will need an OpenJDK instance installed on a Linux system. The deb, rpm, or ebuild distributions will suite us really well, although we will see a method for generic Linux configuration also.

Also, we will need the bash startup files to be installed properly.

Tip

In most Linux distributions, the generic way to configure anything that needs root access is not recommended, and the results of such an approach tend to vanish with each update. Usually, there are distribution-recommended how-to's where the problem solution is described.

How to do it...

First let's check whether your bash startup files are installed. The simplest possible way is to configure your OpenJDK using them. They are system-wide and easy to use, though there are drawbacks in their usage, such as update conflicts:

  1. Type the following line in your terminal:
    cat /etc/profile

    If the file exists and contains some kind of shell script, then your bash startup file's setup is probably correct. If not, please set it up by following your distribution instructions.

  2. Then add the /etc/profile.d/openjdk.sh file.
  3. In order to configure different things, write the following:
    To set JAVA_HOME
    JAVA_HOME=<youJDK installation directory>
    export JAVA_HOME
    
    To append JAVA_HOME to PATH
    pathappend $JAVA_HOME/bin PATH
    
    To adjust CLASSPATH directory
    AUTO_CLASSPATH_DIR=<classpath dir>
    pathprepend . CLASSPATH
    
    for dir in `find ${AUTO_CLASSPATH_DIR} -type d 2>/dev/null`; do
        pathappend $dir CLASSPATH
    done
    
    for jar in `find ${AUTO_CLASSPATH_DIR} -name "*.jar" 2>/dev/null`; do
        pathappend $jar CLASSPATH
    done
    
    export CLASSPATH

    Tip

    The CLASSPATH env variable should be avoided as much as possible. It is generally used by legacy Java applications mostly configured for JDK 1.2 and below. Use -classpath with java and javac commands instead.

The preceding code is quite simple—it just appends all JAR files to the classpath.

How it works…

This script is called during shell initialization, so whenever you perform shell initialization, these variables will be exported. The variables are thus system-wide, so be careful while playing with them, as they can cause your Java to fail permanently if you make some errors in this file.

There's more...

On Linux, you can see the directory structure of the installed OpenJDK using the tree command.

To do so, install the tree package (use your distribution's documentation if possible) and type:

tree -L 1 <path-to-openjdk> -lah

You will see something like the following:

/usr/lib/jvm/java-7-openjdk-amd64
├── [  22]  ASSEMBLY_EXCEPTION -> jre/ASSEMBLY_EXCEPTION
├── [4.0K]  bin
├── [  41]  docs -> ../../../share/doc/openjdk-7-jre-headless
├── [4.0K]  include
├── [4.0K]  jre
├── [4.0K]  lib
├── [4.0K]  man
├── [  20]  src.zip -> ../openjdk-7/src.zip
└── [  22]  THIRD_PARTY_README -> jre/THIRD_PARTY_README

This is the first-level directory structure in which:

  • ASSEMBLY_EXCEPTION is about licensing, and so is THIRD_PARTY_README.
  • The docs folder is for various OpenJDK documentation (changelog, copyrights, authors, and so on).
  • The include directory is to include paths (for JNI, for example).
  • The jre directory is where the Java Runtime is placed.
  • The lib directory is where various OpenJDK libraries are placed (such as Jigsaw or CORBA support; mainly, it consists of all OpenJDK code).
  • The man command is a manual pages entry for OpenJDK. It contains OpenJDK classes, javadocs, and other manual entries. It may be extremely useful in the highly improbable event of Internet connection loss.

Navigating through OpenJDK groups and projects

OpenJDK is not one huge project. It consists of a large number of subprojects, and is developed by relatively small groups of developers. We will look at them and realize what is going on under the hood of OpenJDK.

Getting ready

To follow this recipe, you will need an OpenJDK instance installed and an established Internet connection. The recipe is more for the initial understanding of the process rather than for practical use, so if you are familiar with these matters, don't hesitate to skip this recipe entirely.

How to do it...

We will see what OpenJDK consists of:

  1. Go to http://openjdk.java.net/.
  2. In the right column, there are overviews of groups as well as projects.
  3. We will select one of them to get through the process.

    Tip

    The process will be described in detail in Chapter 8, Hacking OpenJDK.

  4. Let the selected project be JDK9.
  5. Go to the JDK9 project page at http://openjdk.java.net/projects/jdk9/.

There's not very much to see, because there is only the basic on-boarding information. Most of the project business is in the bug tracker.

After we read the information about the project on an official site, we will go to JDK JIRA to see what's happening here. We will go to the JDK9 part of JIRA at https://bugs.openjdk.java.net/browse/JDK/fixforversion/14949.

Here we can see various issues related directly to JDK9 and see how the process is going.

How it works…

Groups are sets of developers who may work on different projects but in one large scope. Developers participate in chosen projects, and projects are sponsored by groups.

Tip

To participate in a group and become a contributor, follow the instructions at http://openjdk.java.net/contribute/.

There are four major types of projects:

  • Feature
  • Improvement
  • Replacement
  • Portability

For example, the JDK9 project is a featured one. The graphics rasterizer project is a replacement one, while the Swing group is a whole group that is focused on the improvement of Swing.

Various ports' projects are obviously the portability ones.

See also

Left arrow icon Right arrow icon

Description

If you are an experienced Java developer using Java 7 platform and want to get your grips on OpenJDK for Java development, this is the book for you. JDK users who wish to migrate to OpenJDK will find this book very useful.

Who is this book for?

If you are an experienced Java developer using Java 7 platform and want to get your grips on OpenJDK for Java development, this is the book for you. JDK users who wish to migrate to OpenJDK will find this book very useful.

What you will learn

  • Set up a development environment and start hacking OpenJDK
  • Understand advanced features such as adding new intrinsics to JVMs
  • Build different versions of OpenJDK for different operating systems and architectures
  • Write reliable tests using jtreg and get a good understanding of the tool
  • Create and sub limit patches with improvements and bug fixes
  • Understand valuable techniques, native code debugging, and incremental builds
  • Prepare VirtualBox machines with different operating systems
  • Understand the process behind JEPs
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Last updated date : Feb 11, 2025
Publication date : Jan 30, 2015
Length: 298 pages
Edition : 1st
Language : English
ISBN-13 : 9781849698405
Vendor :
Oracle
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Last updated date : Feb 11, 2025
Publication date : Jan 30, 2015
Length: 298 pages
Edition : 1st
Language : English
ISBN-13 : 9781849698405
Vendor :
Oracle
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 119.97
ElasticSearch Cookbook - Second Edition
€45.99
Vagrant Virtual Development Environment Cookbook
€36.99
OpenJDK Cookbook
€36.99
Total 119.97 Stars icon

Table of Contents

14 Chapters
1. Getting Started with OpenJDK Chevron down icon Chevron up icon
2. Building OpenJDK 6 Chevron down icon Chevron up icon
3. Building OpenJDK 7 Chevron down icon Chevron up icon
4. Building OpenJDK 8 Chevron down icon Chevron up icon
5. Building IcedTea Chevron down icon Chevron up icon
6. Building IcedTea with Other VM Implementations Chevron down icon Chevron up icon
7. Working with WebStart and the Browser Plugin Chevron down icon Chevron up icon
8. Hacking OpenJDK Chevron down icon Chevron up icon
9. Testing OpenJDK Chevron down icon Chevron up icon
10. Contributing to OpenJDK Chevron down icon Chevron up icon
11. Troubleshooting Chevron down icon Chevron up icon
12. Working with Future Technologies Chevron down icon Chevron up icon
13. Build Automation Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(2 Ratings)
5 star 50%
4 star 0%
3 star 50%
2 star 0%
1 star 0%
Sergey Grinev Mar 23, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
OpenJDK Cookbook is a great source of information about building, tweaking and testing OpenJDK. It provides numerous recipes to cover all these tasks accompanied with historical data and links for deep diving in the topic.Being well structured this book can be used as reference data for topics like: building OpenJDK from 6 to 9 and components on various platforms, running tests, studying performance and adding new code like intrinsics or new JSRs.From the other side book also provides a lot of interesting data for those who interested in Java history, content of the OpenJDK and the community workflow.I definitely recommend this book for any experienced Java developer.
Amazon Verified review Amazon
Amazon Customer Apr 18, 2017
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
It's more like a big installation guide. There is only one or two chapters about profiling and Iced Tea that are actually worth reading. You won't learn much about the details of the VM or the difference to Oracle JDK.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
Modal Close icon
Modal Close icon