Coder Social home page Coder Social logo

judo-eclipse-zulu-jdk's Introduction

About

The project is derived from https://github.com/buchen/bundled-jre, but we here we use different namespace and JDK is embedded not the JRE.

An Eclipse feature of OSGi bundles packaging the Java Runtime Engine (JRE) for Windows, Mac, and Linux. It is used to bundle and distribute the JRE with the Portfolio Performance Eclipse e4 application.

From a license perspective, I wanted to use the OpenJDK for my open source program. The OpenJDK itself is not providing binaries for all platforms, but thankfully Azul does with Zulu. Check out this OpenSource StackExchange on a discussion why the Oracle JRE does not work well with FOSS.

The Idea

In short, the idea is outlined in the blog post Including a JRE in a Tycho build.

The Tycho build in this repository does:

  • Download the JDK builds from Zulu
  • Create bundles with the appropriate setJvm p2 Touchpoint Instructions
  • Create a feature with all JRE bundles and a repository for use in other builds
  • Create an RCP e4 application with self-update functionality to test the packaged JRE

Notes

The Java version is configured in bundles/pom.xml:

<properties>
  <download.url>https://cdn.azul.com/zulu/bin/</download.url>
  <download.file>zulu11.58.23-ca-jdk11.0.16-</download.file>
  ...
</properties>

Review the p2.inf - no change needed. The p2.inf files have to be generated during the build because they must contain the correct path - including the version. On Linux and macOS, additionally executable permissions must be set.

instructions.configure = \
  org.eclipse.equinox.p2.touchpoint.eclipse.setJvm(jvm:../Eclipse/plugins/name.abuchen.zulu.jre.macosx.x86_64_${version}/jre/lib/server/libjvm.dylib);

instructions.unconfigure = \
  org.eclipse.equinox.p2.touchpoint.eclipse.setJvm(jvm:null);

instructions.install = \
  org.eclipse.equinox.p2.touchpoint.eclipse.chmod(targetDir:${installFolder}/plugins/name.abuchen.zulu.jre.macosx.x86_64_${version}/jre/,targetFile:bin,permissions:755,options:-R);\
  org.eclipse.equinox.p2.touchpoint.eclipse.chmod(targetDir:${installFolder}/plugins/name.abuchen.zulu.jre.macosx.x86_64_${version}/jre/lib,targetFile:jspawnhelper,permissions:755);

Then add the feature to the product definition - see test.product:

<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>

<product name="Test Product" ... >

   <features>
      <feature id="test.feature"/>
      <feature id="org.eclipse.e4.rcp"/>
      ...

      <feature id="name.abuchen.zulu.jre.feature"/>
      
   </features>
</product>

Building

Build with Maven 3.x:

mvn clean verify

Then run the test product created in ~/test/test.product/target/products.

Update the versions using the Tycho versions plugin:

mvn org.eclipse.tycho:tycho-versions-plugin:1.0.0:set-version -DnewVersion=11.0.4

Of course, this does not update the JRE version itself (update the Java version in the bundles/pom.xml). But it is helpful to test the self-update: build once, then copy the test product to a separate location, update the version number, and build again. Then you can run the self-update in the test product. Check that java.home environment points to the JRE in the updated bundle.

judo-eclipse-zulu-jdk's People

Contributors

robertcsakany avatar blackbelt-oss avatar borcsokj avatar kristofkakuszi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.