Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Using Red Hat Application Migration Toolkit to see the impact of migrating to OpenJDK

January 9, 2019
Syed M Shaaf
Related topics:
JavaDeveloper tools
Related products:
Streams for Apache Kafka

    Migrating from one software solution to another is a reality that all good software developers need to plan for. Having a plan helps to drive innovation at a continuous pace, whether you are developing software for in-house use or you are acquiring software from a vendor. In either case, never anticipating or planning for migration endangers the entire innovation value proposition. And in today's ever-changing world of software, everyone who wants to benefit from the success of the cloud has to ensure that cloud innovation is continuous. Therefore, maintaining a stack that is changing along with technological advancements is a necessity.

    In this article, we will take a look at the impact of moving to OpenJDK and the results will aid in drawing further conclusions and in planning. It's quite common to be using a proprietary version of JDK, and this article addresses how to use Red Hat Application Migration Toolkit to analyze your codebase to understand the impact of migrating to OpenJDK.

    What is Red Hat Application Migration Toolkit?

    Red Hat Application Migration Toolkit is a customizable and extensible rules-based tool that looks for common resources and highlights technologies and known potential impact areas when migration is required. It can be used with tools like Maven, and it generates reports from its runs that you can view in a browser. It also has browser-based tooling for doing the same.

    The goal is to provide a high-level view of the use of technologies like Java and how they can be migrated to the latest versions of OpenJDK or Red Hat JBoss Enterprise Application Platform or even from other containers. The goal is to give a general impact analysis that will aid in estimates, documentation, and migration. For more details on Red Hat Application Migration Toolkit, please visit the see the documentation.

    Getting started with Red Hat Application Migration Toolkit

    Red Hat Application Migration Toolkit has the following different interfaces. For the sake of simplicity, we will stick to the Maven example. In any case, the following links should help provide further information:

    • CLI
    • Web console
    • Eclipse plugin
    • Maven plugin

    Let's get started. We will need to set up the prerequisites to run the Red Hat Application Migration Toolkit.

    Installing OpenJDK

    Red Hat Application Migration Toolkit has been tested on Linux, Windows, and macOS. Other operating systems with Java 8+ support should work equally well and Oracle JDK 8 will also work, assuming you have a running JDK setup.

    If you are running Red Hat Enterprise Linux 7, rpms can be found in the rhel-7-server-rpms channel.

    Run the following command to install OpenJDK:

    $ sudo yum install java-1.8.0-openjdk-devel.x86_64

    Detailed instructions on installing OpenJDK can also be found here.  (See this article if you need to enable sudo)

    Installing Maven

    Now we must also ensure that Maven is installed. First, download it here.

    Once it is downloaded, follow the instructions below, which assume you are running it on Red Hat Enterprise Linux.

    Extract the ZIP archive to the directory where you wish to install Maven.

    Open your .bash_profile file in a terminal: vi ~/.bash_profile.

    Add the M2_HOME environment variable to the file:

    export M2_HOME=/path/to/your/maven (this is where you have extracted maven archive)

    Now let's add the bin directory of Maven to our path so we can use it on our system:

    export PATH=$M2_HOME/bin:$PATH

    Make sure that JAVA_HOME is set to the location of your OpenJDK installation, for example:

    export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk.x86_64

    Make sure that $JAVA_HOME/bin is in your PATH environment variable.

    Save the file and exit your text editor.

    Open a new terminal and run the following command to verify that Maven is installed successfully on your machine:

    $ mvn --version

    If you have, for example, the epel-apache-maven repo, it also possible to install Maven via yum.

    Now that there is a running Java and Maven installation, let's get right to using Red Hat Application Migration Toolkit.

    If you have a current Java project that needs to be analyzed great; otherwise, the following example project can be downloaded here.

    Running Red Hat Application Migration Toolkit

    Let's run through the example project to familiarize ourselves with the setup.

    To use Red Hat Application Migration Toolkit in a project, add the following plugin to the build section of the POM file. In the example project, this already exists.

    <plugin>
    <groupId>org.jboss.windup.plugin</groupId>
    <artifactId>windup-maven-plugin</artifactId>
    <version>4.2.0.Final</version>
    <executions>
      <execution>
        <id>run-windup</id>
        <phase>package</phase>
        <goals>
          <goal>windup</goal>
        </goals>
      </execution>
    </executions>
    <configuration>
      <offlineMode>true</offlineMode>
      <windupVersion>4.2.0.Final</windupVersion>
    </configuration>
    </plugin>

    This will allow Red Hat Application Migration Toolkit to run during the builds.

    Via the terminal, navigate to the project directory and use the following command to execute the build on the terminal.

    $ mvn clean install

    Viewing the analysis report

    The build could take some time depending on the source. It will ensure that Red Hat Application Migration Toolkit is downloaded and will execute the analysis ending with a nice report. Once the build is finished, the results can be accessed via the following directory in the project:

    target/windup-report/index.html

    Let's go through the results by opening the page in a browser:

    Opening the results in a browser

    In the browser, you can see areas of potential migration and also the application name. Click on “main,” which should navigate to the details page:

    Details page

    When migrating from Oracle JDK to OpenJDK there will be differences based on the version of JDK. In the report shown above, the incidents, that is, APIs that will not work with OpenJDK, are reported. In the above example, javafx from our application is reported, as are crypto and awt.

    Let's take a more detailed look at what these incidents are by clicking the Issues tab.

    Closer look at the incidences

    The screenshot above shows clear explanations of incompatibilities when migrating from Oracle JDK to OpenJDK version 8. There are also details with links to the knowledge base as well as a description of what remedies can be made. These hints should give guidance and also help in estimating the efforts required to change the code on a class or per-line basis.

    Taking it a bit further, as a project leader, you would also want to know the dependencies and how they map. Red Hat Application Migration Toolkit does that in detail for all the code it has analyzed. Following is another screenshot that illustrates this:

    Dependencies and how they map

    Conclusion

    The example above showcases some of the affected areas during a migration and the usefulness of Red Hat Application Migration Toolkit for such project.

    There are many more interesting features. To read further, visit the documentation page here.

    If you would like to try the above example, it's also shared in the GitHub repo with the sample code and Maven POM file.

    Additional Resources

    • Migrating from Oracle JDK to OpenJDK on Red Hat Enterprise Linux: What you need to know
    • What's new in Red Hat Application Migration Toolkit 4.2 including Oracle JDK to OpenJDK migration
    • An introduction to Red Hat Application Migration Toolkit
    Last updated: May 1, 2019

    Recent Posts

    • Tekton joins the CNCF as an incubating project

    • Federated identity across the hybrid cloud using zero trust workload identity manager

    • Confidential virtual machine storage attack scenarios

    • Introducing virtualization platform autopilot

    • Integrate zero trust workload identity manager with Red Hat OpenShift GitOps

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.