days
-2
-6
hours
-1
-9
minutes
-3
-2
seconds
-4
-2
Keeping it close to OpenJDK

Knights of the Round (OpenJDK) Table: It’s time to put a spotlight on SapMachine

Gabriela Motroc
OpenJDK
© Shutterstock / Mario Breda

Amazon Corretto was announced in November 2018 but this free distribution of OpenJDK is *now* generally available. We started the conversation about OpenJDK providers last year but now that new players are springing up, it’s time to revisit some projects that we might have missed.

The confusion over the rights to use Oracle JDK vs Oracle’s OpenJDK builds vs OpenJDK builds from other providers has been hovering over us for quite some time but now that the confusion has been untangled, it’s time to focus on the things that drive Java’s future.

The list of providers of free OpenJDK builds is getting longer. We now have AdoptOpenJDK, Azul, IBM, Red Hat, Linux (to name a few) and Amazon Corretto, which joined the party in late 2018. That’s not surprising though, especially since “OpenJDK is the future of Java,” as Rich Sharples, Senior Director of Product Management for Middleware at Red Hat told us in an interview in November 2018.

Although we’re (hopefully) past that stage of confusion,  it’s important to put a spotlight on as many OpenJDK providers as possible to make sure readers are able to make educated choices. One project that was not included on the list is SapMachine, an OpenJDK release maintained and supported by SAP.

Knights of the Round (OpenJDK) Table: SapMachine

SapMachine contains a downstream version of the OpenJDK project. “It is used to build and maintain a SAP supported version of OpenJDK for SAP customers and partners who wish to use OpenJDK to run their applications,” according to the wiki.

Since the SapMachine team’s goal is to keep this project as close to OpenJDK as possible, features identified as required by SAP applications should be developed in and contributed to OpenJDK. If this isn’t feasible, the differences between SapMachine and OpenJDK should be kept as small as possible.

SEE ALSO: Recent changes and what’s next for Java: “OpenJDK is the future of Java”

What does this mean?

  • Features not accepted via the OpenJDK reviewing process may still find their way into OpenJDK code when switched off by default. It is generally considered acceptable to switch on such features by default in SapMachine.
  • Features which require functional changes in the code may still be acceptable. However, this will have to be decided for each particular case.

If you’re interested in the differences between SapMachine and OpenJDK, read this.

How to contribute

  • Clone the repository and checkout the branch to which you want to add your changes. You can also fork the SapMachine repository and work in your fork. This will be required if you don’t have the permission to work on the SapMachine repository or don’t want to pollute the master repository with development branches.
    git clone http://github.com/SAP/SapMachine
    cd SapMachine
    git checkout sapmachine
  • Create a new branch for your development.
    git checkout -b my-feature-branch
  • Make your changes – In case you have a patch file you can apply it:
    git apply --verbose --whitespace=fix --reject my-changes.changeset
  • Check your changed files using git status. You might need to stage untracked files using git add.
  • Commit your changes:
    git commit -a
  • Alternative: instead of patching or editing and then commiting a change, you can cherry-pick it if it is already somewhere in our git repository:
    git cherry-pick -x 82a4d39b0e6e21061bfd30b34eeea7805f5a9056
  • Push your branch to github.
    git push --set-upstream origin my-feature-branch
  • Create a pull-request. Visit the repository with your browser. Using the web UI, create a new PR to merge your branch into sapmachine or sapmachine<version>. See also creating a pull request. Once the PR is created an automatic build and verification job is started. The PR can be merged if two reviewers approve the change and the test build and verification finished successfully. The PR verification will run some jtreg regression tests, especially from areas where SapMachine has different behaviour compared to OpenJDK.
Author
Gabriela Motroc
Gabriela Motroc is editor of JAXenter.com and JAX Magazine. Before working at Software & Support Media Group, she studied International Communication Management at the Hague University of Applied Sciences.

Leave a Reply

Your email address will not be published.