hu.blackbelt.judo.eclipse.jdk.zulu:test-app

Zulu JDK for Eclipse

License

License

Categories

Categories

Java Languages CLI User Interface Zulu
GroupId

GroupId

hu.blackbelt.judo.eclipse.jdk.zulu
ArtifactId

ArtifactId

test-app
Last Version

Last Version

11.0.8
Release Date

Release Date

Type

Type

pom
Description

Description

Zulu JDK for Eclipse

Download test-app

Filename Size
test-app-11.0.8.pom 666 bytes
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/hu.blackbelt.judo.eclipse.jdk.zulu/test-app/ -->
<dependency>
    <groupId>hu.blackbelt.judo.eclipse.jdk.zulu</groupId>
    <artifactId>test-app</artifactId>
    <version>11.0.8</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/hu.blackbelt.judo.eclipse.jdk.zulu/test-app/
implementation 'hu.blackbelt.judo.eclipse.jdk.zulu:test-app:11.0.8'
// https://jarcasting.com/artifacts/hu.blackbelt.judo.eclipse.jdk.zulu/test-app/
implementation ("hu.blackbelt.judo.eclipse.jdk.zulu:test-app:11.0.8")
'hu.blackbelt.judo.eclipse.jdk.zulu:test-app:pom:11.0.8'
<dependency org="hu.blackbelt.judo.eclipse.jdk.zulu" name="test-app" rev="11.0.8">
  <artifact name="test-app" type="pom" />
</dependency>
@Grapes(
@Grab(group='hu.blackbelt.judo.eclipse.jdk.zulu', module='test-app', version='11.0.8')
)
libraryDependencies += "hu.blackbelt.judo.eclipse.jdk.zulu" % "test-app" % "11.0.8"
[hu.blackbelt.judo.eclipse.jdk.zulu/test-app "11.0.8"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • test.rcp
  • test.feature
  • test.product

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.33.15-ca-jre11.0.4-</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.

hu.blackbelt.judo.eclipse.jdk.zulu

BlackBelt Technology

Versions

Version
11.0.8
8.0.242
8.0.232