Java SE Embedded 8 enables developers to create customized JREs using the JRECreate tool. Starting with Java SE Embedded 8, individual JRE downloads for embedded platforms are no longer provided. To get started, download the bundle below and follow instructions to create a JRE that suits your application's needs.Of course, for a leJOS developer who would like to use Java 8, this is not entirely helpful. Following some hints on the LeJOS EV3 forums, I was able to figure out how to do this. This sequence of shell commands should work on any Unix/Linux platform. (I am using a Mac.) I would imagine it would also work on Windows if gzip and tar programs are installed.
gunzip ejdk-8-fcs-b132-linux-arm-sflt-03_mar_2014.gz tar xvf ejdk-8-fcs-b132-linux-arm-sflt-03_mar_2014 cd ejdk1.8.0/bin export JAVA_HOME=/usr ./jrecreate.sh --dest ../../ejre-8u1-linux-arm-15_may_2015 --profile compact2 --vm client
cd ../.. tar cvf ejre-8u1-linux-arm-15_may_2015.tar ejre-8u1-linux-arm-15_may_2015 gzip ejre-8u1-linux-arm-15_may_2015.tar
Having created the Java 8 configuration file
ejre-8u1-linux-arm-15_may_2015.tar.gz, simply specify it when creating the SD card, and everything should work fine.
The English-language summary of the above command sequence is as follows:
- Uncompress the archive using
- Extract the contents of the archive using
- Go to the subdirectory containing
- On Windows, you would want to use
- Set up the
JAVA_HOMEenvironment variable if it is not already set.
jrecreatewith the following options:
--destspecifies where the configured implementation will be placed.
--profileneeds to be compact2 to ensure certain features LeJOS requires are present.
--vmneeds to be client for the same basic reason.
tarto repack the archive.
gzipto compress the archive.
- I made up a filename that seems to be compatible with what LeJOS will be looking for.