Installing leJOS

Sven Köhler Andy Shaw Lawrie Griffiths

Installing leJOS

To install leJOS you will need a blank SD card of at least 2GB and no more than 32GB. SDXC cards are not supported by the EV3 hardware. The card needs to be formatted with a FAT32 partition. We recommend that you use the following program to format the card: Even if the card is new it is worth using this program as SD cards sometimes have hidden partitions on them which can cause problems with the EV3.

To install leJOS on Microsoft Windows, see [Windows Installation]

If you're using Linux or Mac OS X, then download a file named leJOS_EV3_<version>.tar.gz from the leJOS EV3 download page and unpack it.

If you are using Eclipse, you can install the Eclipse plugin, and set the EV3_HOME preference
setting to the directory that you unpacked leJOS to (the leJOS home directory).

If you are not an Eclipse user or do not want to use the plugin, see [Using ant build files] for an alternative way to create runnable jar files and upload them to the EV3.

To use the command line tools, you should set the environment variables EV3_HOME to point to the
leJOS home directory and include the bin directory on your PATH.

You can also set LEJOS_EV3_JAVA_HOME if you want leJOS to use a specific version of the JDK.

To use the leJOS samples you should import the file into Eclipse.

The development source of leJOS is available in the source.tar.gz file. This only includes the Java
source. To get the source for the SD card Linux system, you should go to the Git ev3sdcard repository.

After you have installed leJOS on your PC, you will need to create an SD card. To do this you need an empty SD card with a FAT32 partition of at least 200MB. The card itself should be at least 1GB and no more than 32GB. SDXC cards are not supported by the EV3 hardware.

If your card does not have a FAT32 partition, you can use a partition utility to reformat it as FAT32, or write the sd500.img file in the file (which is part of the distribution) to the disk as an image file (using dd or a disk image writing utility).

You should then unzip the file from the leJOS home directory to the root directory of the card, and download and copy the Oracle JRE .tar.gz file to the card. The file is available at You will need to create a free Oracle account, if you do not have one.

When you have written these files to the card, safely remove it, put it in the EV3 and boot the EV3. leJOS will then reformat your card to have a 500MB FAT32 partition and a Linux ext2 partition using the rest of the card. It will prepare the card for use by leJOS showing you its progress as it goes. This process takes about 8 minutes.

If you are a Windows user, but have trouble with the installer for any reason, you can use the zip distribution instead, and install it manually as described here.


EV3 Wiki: Getting started with leJOS EV3
EV3 Wiki: Using ant build files
EV3 Wiki: Windows Installation