OpenJDK for EV3
A custom build of OpenJDK 9 & 10 for EV3, a Lego Mindstorms programmable brick featuring a ARM926EJ-S CPU.
Components
The output consists of these parts:
- JRI running on the EV3 -
jri-ev3.zip- Stripped down version of Java -- a Java Runtime Image
- Intended for normal users.
- Full JDK running on the EV3 -
jdk-ev3.zip- Intended for Linux power users.
- EV3 jmods
- They can be used for creating custom JRIs.
- Intended for advanced users wanting to add additional OpenJDK modules.
Building
- Clone/download this repo to your computer.
- Install Docker for your operating system.
- Build the jdk cross-compilation OS:
sudo docker build -t ev3dev-lang-java:jdk-stretch -f system/Dockerfile systemSemi-manual build
- Build the jdk cross-compilation environment:
sudo docker build -t ev3dev-lang-java:jdk-build -f scripts/Dockerfile scripts- Run the newly prepared container. You have to mount a host directory to the the
/builddirectory in the container, otherwise the build would get discarded. The final build needs at least 6.5 GB of free space (in the build directory).
sudo docker run --rm -it -v $BUILD_DIRECTORY:/build ev3dev-lang-java:jdk-build
Please change the $BUILD_DIRECTORY to a valid path.
- Select the OpenJDK version and VM you want to cross-compile (select only one for each variable):
export JDKVER=9 # OpenJDK 9
export JDKVER=10 # OpenJDK 10
export JDKVER=dev # OpenJDK Master+dev (to-be OpenJDK 11 at the time of writing)
export JDKVM=zero # Use Zero interpreter
export JDKVM=client # Use ARM32 JIT
- Before we can start the build process, Boot JDK must be downloaded:
./prepare.sh
- Now we can download the OpenJDK sources:
./fetch.sh
- The OpenJDK source tree should be ready. Now you can start the cross-build itself:
./build.sh
- Create the zipped images:
./zip.sh
- If the build was successful, JDK packages were created in
/build/jri-ev3.tar.gz,/build/jdk-ev3.tar.gzand/build/jmods.tar.gz. If you have mounted/build, you can access the files from the host.
Automatic build
- Build the jdk cross-compilation environment:
sudo docker build -t ev3dev-lang-java:jdk-autobuild -f scripts/Dockerfile.autorun scripts- Run the newly prepared container. You have to mount a host directory to the the
/builddirectory in the container, otherwise the build would get discarded. The final build needs at least 6.5 GB of free space (in the build directory).
sudo docker run --rm -it -v $BUILD_DIRECTORY:/build -e JDKVER='X' -e JDKVM='Y' ev3dev-lang-java:jdk-autobuild
X can be one of 9 and 10. Y can be one of zero and client, see above. Please change the $BUILD_DIRECTORY to a valid path.
- If the build was successful, JDK packages were created in
$BUILD_DIRECTORY/jri-ev3.tar.gz,$BUILD_DIRECTORY/jdk-ev3.tar.gzand$BUILD_DIRECTORY/jmods.tar.gz.
JShell on the EV3
No longer supported. JShell backend on the EV3 is a huge overkill.
OpenJDK for leJOS
LeJOS has probably reached its EOL. It is not a priority anymore to support it. linux-devkit + CodeSourcery GCC could be used for cross-compilation of it.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
