Creating a Java SE Embedded 8 JRE using jrecreate.sh

Java SE 8 is the first Java release to incorporate JRE ‘profiles’, customized subsets of JRE libraries according to the needs of your app.

From the SE Embedded you need to create the JRE based on a selected profile and then copy it across to your device:

./bin/jrecreate.sh --help

to get a list of the options (more notes here).

To run the above on a Mac, you’ll need to set your JAVA_HOME first, assuming you already have an SE JDK installed. The Java install on Macs is different from other platforms, to handle having multiple versions installed. I have notes in a previous post on how to do this here.

Create a compact1 profile jre with:

./bin/jrecreate.sh --dest jre8 -p compact1

Zip the created dir with

zip -r jre8.zip jre8/*

Scp it over to your target device, unzip and you’re ready to go!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.